Linux cfdisk Command
The Linux cfdisk command is used for disk partitioning.
cfdisk is a program for disk partitioning, similar to DOS's fdisk but with an interactive interface instead of the traditional question-and-answer interface. You can easily control partitioning operations using the arrow keys.
Syntax
cfdisk [-avz][-c <cylinders>-h <heads>-s <sectors>][-P <r,s,t>][device identifier]
Parameter Description:
-a Use arrows instead of highlighting to indicate selection in the program.
-c<cylinders> Ignore BIOS values and directly specify the number of cylinders on the disk.
-h<heads> Ignore BIOS values and directly specify the number of heads on the disk.
-P<r,s,t> Display the contents of the partition table. The additional parameter "r" shows detailed information about the entire partition table, "s" displays information in the order of sectors, and "t" shows data in terms of heads, sectors, and cylinders.
-s<sectors> Ignore BIOS values and directly specify the number of sectors on the disk.
-v Display version information.
-z Do not read existing partitions; treat the disk as new without any partitions.
Example
Perform disk partitioning:
# cfdisk
Perform disk partitioning using arrows for operation instead of highlighting:
# cfdisk -a
Perform disk partitioning using arrows for operation instead of highlighting:
# cfdisk -s 3