table of contents
CFDISK(8) | System Administration | CFDISK(8) |
NAME¶
cfdisk - display or manipulate a disk partition table
SYNOPSIS¶
cfdisk [options] [device]
DESCRIPTION¶
cfdisk is a curses-based program for partitioning any block device. The default device is /dev/sda.
Note that cfdisk provides basic partitioning functionality with a user-friendly interface. If you need advanced features, use fdisk(8) instead.
All disk label changes will remain in memory only, and the disk will be unmodified until you decide to write your changes. Be careful before using the write command.
Since version 2.25 cfdisk supports MBR (DOS), GPT, SUN and SGI disk labels, but no longer provides any functionality for CHS (Cylinder-Head-Sector) addressing. CHS has never been important for Linux, and this addressing concept does not make any sense for new devices.
Since version 2.25 cfdisk also does not provide a 'print' command any more. This functionality is provided by the utilities partx(8) and lsblk(8) in a very comfortable and rich way.
If you want to remove an old partition table from a device, use wipefs(8).
OPTIONS¶
-h, --help
-V, --version
-L, --color[=when]
--lock[=mode]
-r, --read-only
-z, --zero
COMMANDS¶
The commands for cfdisk can be entered by pressing the corresponding key (pressing Enter after the command is not necessary). Here is a list of the available commands:
b
d
h
n
The size may be followed by a multiplicative suffix: KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB").
q
r
Note that reducing the size of a partition might destroy data on that partition.
s
t
u
The script files are compatible between cfdisk, fdisk(8) sfdisk(8) and other libfdisk applications. For more details see sfdisk(8).
It is also possible to load an sfdisk-script into cfdisk if there is no partition table on the device or when you start cfdisk with the --zero command-line option.
W
The re-reading of the partition table does not always work. In such a case you need to inform the kernel about any new partitions by using partprobe(8) or partx(8), or by rebooting the system.
x
Up Arrow, Down Arrow
Left Arrow, Right Arrow
All commands can be entered with either uppercase or lowercase letters (except for Write). When in a submenu or at a prompt, you can hit the Esc key to return to the main menu.
COLORS¶
The output colorization is implemented by terminal-colors.d(5) functionality. Implicit coloring can be disabled by an empty file
/etc/terminal-colors.d/cfdisk.disable
for the cfdisk command or for all tools by
/etc/terminal-colors.d/disable
The user-specific $XDG_CONFIG_HOME/terminal-colors.d or $HOME/.config/terminal-colors.d overrides the global setting.
Note that the output colorization may be enabled by default, and in this case terminal-colors.d directories do not have to exist yet.
cfdisk does not support color customization with a color-scheme file.
ENVIRONMENT¶
CFDISK_DEBUG=all
LIBFDISK_DEBUG=all
LIBBLKID_DEBUG=all
LIBSMARTCOLS_DEBUG=all
LIBSMARTCOLS_DEBUG_PADDING=on
LOCK_BLOCK_DEVICE=<mode>
AUTHORS¶
Karel Zak <kzak@redhat.com>
The current cfdisk implementation is based on the original cfdisk from Kevin E. Martin <martin@cs.unc.edu>.
SEE ALSO¶
REPORTING BUGS¶
For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.
AVAILABILITY¶
The cfdisk command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.
2022-05-11 | util-linux 2.38.1 |