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 \fB\-\-lock\fR[=\fImode\fR]
65 Use exclusive BSD lock for device or file it operates. The optional argument
66 \fImode\fP can be \fByes\fR, \fBno\fR (or 1 and 0) or \fBnonblock\fR. If the \fImode\fR
67 argument is omitted, it defaults to \fB"yes"\fR. This option overwrites
68 environment variable \fB$LOCK_BLOCK_DEVICE\fR. The default is not to use any
69 lock at all, but it's recommended to avoid collisions with udevd or other
72 .BR \-V , " \-\-version"
73 Display version information and exit.
76 Start with an in-memory zeroed partition table. This option does not zero the
77 partition table on the disk; rather, it simply starts the program without
78 reading the existing partition table. This option allows you to create a new
79 partition table from scratch or from an sfdisk-compatible script.
84 can be entered by pressing the corresponding key (pressing
86 after the command is not necessary). Here is a list of the available
90 Toggle the bootable flag of the current partition. This allows you to
91 select which primary partition is bootable on the drive. This command may not
92 be available for all partition label types.
95 Delete the current partition. This will convert the current partition
96 into free space and merge it with any free space immediately
97 surrounding the current partition. A partition already marked as free
98 space or marked as unusable cannot be deleted.
101 Show the help screen.
104 Create a new partition from free space.
106 then prompts you for the size of the partition you want to create.
107 The default size is equal to the entire available free space at the current
110 The size may be followed by a multiplicative suffix: KiB (=1024),
111 MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB
112 (the "iB" is optional, e.g., "K" has the same meaning as "KiB").
115 Quit the program. This will exit the program without writing any data to
119 Sort the partitions in ascending start-sector order. When deleting and
120 adding partitions, it is likely that the numbering of the partitions will
121 no longer match their order on the disk. This command restores that match.
124 Change the partition type. By default, new partitions are created as
129 Dump the current in-memory partition table to an sfdisk-compatible script file.
131 The script files are compatible between \fBcfdisk\fR, \fBfdisk\fR, \fBsfdisk\fR
132 and other libfdisk applications. For more details see
135 It is also possible to load an sfdisk-script into \fBcfdisk\fR if there is
136 no partition table on the device or when you start \fBcfdisk\fR with the
137 \fB--zero\fR command-line option.
140 Write the partition table to disk (you must enter an uppercase W). Since
141 this might destroy data on the disk, you must either confirm or deny
142 the write by entering `yes' or `no'. If you enter `yes',
144 will write the partition table to disk and then tell the kernel to re-read the
145 partition table from the disk.
147 The re-reading of the partition table does not always work. In such a
148 case you need to inform the kernel about any new partitions by using
152 or by rebooting the system.
155 Toggle extra information about a partition.
157 .IR "Up Arrow" , " Down Arrow"
158 Move the cursor to the previous or next partition. If there are more
159 partitions than can be displayed on a screen, you can display the next
160 (previous) set of partitions by moving down (up) at the last (first)
161 partition displayed on the screen.
163 .IR "Left Arrow" , " Right Arrow"
164 Select the preceding or the next menu item. Hitting \fIEnter\fR will
165 execute the currently selected item.
168 All commands can be entered with either uppercase or lowercase
171 When in a submenu or at a prompt, you can hit the
173 key to return to the main menu.
176 Implicit coloring can be disabled by creating the empty file
177 .IR /etc/terminal-colors.d/cfdisk.disable .
180 .BR terminal-colors.d (5)
181 for more details about colorization configuration.
184 does not support color customization with a color-scheme file.
188 enables cfdisk debug output.
189 .IP LIBFDISK_DEBUG=all
190 enables libfdisk debug output.
191 .IP LIBBLKID_DEBUG=all
192 enables libblkid debug output.
193 .IP LIBSMARTCOLS_DEBUG=all
194 enables libsmartcols debug output.
195 .IP LIBSMARTCOLS_DEBUG_PADDING=on
196 use visible padding characters. Requires enabled LIBSMARTCOLS_DEBUG.
197 .IP LOCK_BLOCK_DEVICE=<mode>
198 use exclusive BSD lock. The mode is "1" or "0". See \fB\-\-lock\fR for more details.
201 Karel Zak <kzak@redhat.com>
203 The current cfdisk implementation is based on the original cfdisk
204 from Kevin E. Martin (martin@cs.unc.edu).
213 The cfdisk command is part of the util-linux package and is available from
214 https://www.kernel.org/pub/linux/utils/util-linux/.