Linux cfdisk Guide - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Linux cfdisk Guide
Complete beginner-friendly guide to cfdisk on Linux, covering Arch Linux, CachyOS, and other distributions including disk partitioning with a user-friendly interface.
Table of Contents
- Understanding cfdisk
- cfdisk Installation
- cfdisk Interface
- Creating Partitions
- Managing Partitions
- Troubleshooting
Understanding cfdisk
What is cfdisk?
cfdisk is curses-based disk partitioner.
Features:
- User-friendly: Menu-driven interface
- Visual: See partitions clearly
- Easy: Simpler than fdisk
- Safe: Preview before applying
Uses:
- Create partitions: Make new partitions
- Delete partitions: Remove partitions
- Resize partitions: Change partition size
- Format partitions: Set filesystem type
cfdisk Installation
Install cfdisk
Arch/CachyOS:
# Install util-linux (includes cfdisk)
sudo pacman -S util-linux
# Usually pre-installed
Debian/Ubuntu:
sudo apt install util-linux
Fedora:
sudo dnf install util-linux
Launch cfdisk
Start cfdisk:
# Open disk
sudo cfdisk /dev/sda
# Interactive menu appears
cfdisk Interface
Menu Options
Main menu:
- New: Create new partition
- Delete: Delete partition
- Resize: Resize partition
- Type: Change partition type
- Write: Write changes
- Quit: Exit without saving
Navigation
Move around:
- Arrow keys: Navigate menu
- Enter: Select option
- Tab: Switch between sections
Creating Partitions
Create Partition
Steps:
- Select free space
- Choose "New"
- Enter partition size
- Select partition type
- Write changes
Partition Types
Common types:
- Linux: Standard Linux partition
- Linux swap: Swap partition
- EFI System: UEFI boot partition
Managing Partitions
Delete Partition
Remove:
- Select partition
- Choose "Delete"
- Confirm deletion
- Write changes
Resize Partition
Change size:
- Select partition
- Choose "Resize"
- Enter new size
- Write changes
Troubleshooting
cfdisk Not Starting
Check installation:
# Check cfdisk
which cfdisk
cfdisk --version
# Install if missing
sudo pacman -S util-linux
Changes Not Applied
Write changes:
# Make sure to select "Write"
# In cfdisk menu
# Then "Quit"
Summary
This guide covered cfdisk usage, partition management, and disk partitioning for Arch Linux, CachyOS, and other distributions.
Next Steps
- fdisk Guide - fdisk partitioning
- Disk Utilities - Disk tools
- Filesystem Management - Filesystem setup
- cfdisk Documentation:
man cfdisk
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.