1 .\" cfdisk.8 -- man page for cfdisk
2 .\" Copyright 1994 Kevin E. Martin (martin@cs.unc.edu)
3 .\" Copyright (C) 2014 Karel Zak <kzak@redhat.com>
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .TH CFDISK 8 "March 2014" "util-linux" "System Administration"
16 cfdisk \- display or manipulate a disk partition table
23 is a curses-based program for partitioning any block device.
29 provides basic partitioning functionality with a user-friendly interface.
30 If you need advanced features, use
36 supports MBR (DOS), GPT, SUN and SGI disk labels, but no longer provides any
37 functionality for CHS (Cylinder-Head-Sector) addressing. CHS has
38 never been important for Linux, and this addressing concept does not make any
39 sense for new devices.
43 also does not provide a 'print' command any more.
44 This functionality is provided by the utilities
48 in a very comfortable and rich way.
50 If you want to remove an old partition table from a device, use
56 Display help text and exit.
58 .BR \-L , " \-\-color" [ = \fIwhen\fR]
59 Colorize the output. The optional argument \fIwhen\fP
60 can be \fBauto\fR, \fBnever\fR or \fBalways\fR. If the \fIwhen\fR argument is omitted,
61 it defaults to \fBauto\fR. The colors can be disabled, for the current built-in default
62 see \fB\-\-help\fR output. See also the COLORS section.
64 .BR \-V , " \-\-version"
65 Display version information and exit.
68 Start with an in-memory zeroed partition table. This option does not zero the
69 partition table on the disk; rather, it simply starts the program without
70 reading the existing partition table. This option allows you to create a new
71 partition table from scratch or from an sfdisk-compatible script.
76 can be entered by pressing the corresponding key (pressing
78 after the command is not necessary). Here is a list of the available
82 Toggle the bootable flag of the current partition. This allows you to
83 select which primary partition is bootable on the drive. This command may not
84 be available for all partition label types.
87 Delete the current partition. This will convert the current partition
88 into free space and merge it with any free space immediately
89 surrounding the current partition. A partition already marked as free
90 space or marked as unusable cannot be deleted.
96 Create a new partition from free space.
98 then prompts you for the size of the partition you want to create.
99 The default size is equal to the entire available free space at the current
102 The size may be followed by a multiplicative suffix: KiB (=1024),
103 MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB
104 (the "iB" is optional, e.g. "K" has the same meaning as "KiB").
107 Quit the program. This will exit the program without writing any data to
111 Sort the partitions in ascending start-sector order. When deleting and
112 adding partitions, it is likely that the numbering of the partitions will
113 no longer match their order on the disk. This command restores that match.
116 Change the partition type. By default, new partitions are created as
121 Dump the current in-memory partition table to an sfdisk-compatible script file.
123 The script files are compatible between \fBcfdisk\fR, \fBfdisk\fR, \fBsfdisk\fR
124 and other libfdisk applications. For more details see
127 It is also possible to load an sfdisk-script into \fBcfdisk\fR if there is
128 no partition table on the device or when you start \fBcfdisk\fR with the
129 \fB--zero\fR command-line option.
132 Write the partition table to disk (you must enter an uppercase W). Since
133 this might destroy data on the disk, you must either confirm or deny
134 the write by entering `yes' or `no'. If you enter `yes',
136 will write the partition table to disk and then tell the kernel to re-read the
137 partition table from the disk.
139 The re-reading of the partition table does not always work. In such a
140 case you need to inform the kernel about any new partitions by using
144 or by rebooting the system.
147 Toggle extra information about a partition.
149 .IR "Up Arrow" , " Down Arrow"
150 Move the cursor to the previous or next partition. If there are more
151 partitions than can be displayed on a screen, you can display the next
152 (previous) set of partitions by moving down (up) at the last (first)
153 partition displayed on the screen.
155 .IR "Left Arrow" , " Right Arrow"
156 Select the preceding or the next menu item. Hitting \fIEnter\fR will
157 execute the currently selected item.
160 All commands can be entered with either uppercase or lowercase
163 When in a submenu or at a prompt, you can hit the
165 key to return to the main menu.
168 Implicit coloring can be disabled by creating the empty file
169 .IR /etc/terminal-colors.d/cfdisk.disable .
172 .BR terminal-colors.d (5)
173 for more details about colorization configuration.
176 does not support color customization with a color-scheme file.
180 enables cfdisk debug output.
181 .IP LIBFDISK_DEBUG=all
182 enables libfdisk debug output.
183 .IP LIBBLKID_DEBUG=all
184 enables libblkid debug output.
185 .IP LIBSMARTCOLS_DEBUG=all
186 enables libsmartcols debug output.
187 .IP LIBSMARTCOLS_DEBUG_PADDING=on
188 use visible padding characters. Requires enabled LIBSMARTCOLS_DEBUG.
197 Karel Zak <kzak@redhat.com>
199 The current cfdisk implementation is based on the original cfdisk
200 from Kevin E. Martin (martin@cs.unc.edu).
203 The cfdisk command is part of the util-linux package and is available from
204 https://www.kernel.org/pub/linux/utils/util-linux/.