Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.
System administration command. Partition a hard disk using a full-screen display. Normally, device will be /dev/hda, /dev/hdb, /dev/sda, /dev/sdb, /dev/hdc, /dev/hdd, and so on; the default is the first device on the system. See also fdisk.
Options
-a
Use an arrow on the left side to highlight the currently selected partition, instead of reverse video.
-ccylinders
Specify the number of cylinders to use to format the specified device.
-g
Ignore driver-provided geometry; guess one instead.
-hheads
Specify the number of heads to use to format the specified device.
-ssectors
Specify the number of sectors per track to use to format the specified device.
-v
Print version number and exit.
-z
Do not read the partition table; partition from scratch.
-Pformat
Display the partition table in format, which must be r (raw data), s (sector order), or t (table format). See the manpage for the meaning of the fields in the raw format, which shows what will be written by cfdisk for each partition. The sector format shows information about the sectors used by each partition. The table format shows the starting and ending head, sector, and cylinder for each partition.
Commands
up arrow, down arrow
Move among partitions.
left arrow, right arrow
Move among commands at the bottom of the screen.
Enter key
Select currently highlighted command or value.
b
Toggle flag indicating whether selected partition is bootable.
d
Delete partition (allow other partitions to use its space).
g
Alter the disk's geometry. Prompt for what to change: cylinders, heads, or sectors (c, h, or s, respectively).
h
Help.
m
Attempt to ensure maximum usage of disk space in the partition.
n
Create a new partition. Prompt for more information.
p
Print the partition table to a file. Possible formats are the same as for the -P option.
q
Quit without saving information.
t
Prompt for a new filesystem type, and change to that type.
u
Change the partition-size units. The choice of units rotates from megabytes to sectors to cylinders and back.
W
Save information. Must be uppercase, to prevent accidental writing.