1CFDISK(8)                    System Administration                   CFDISK(8)
2
3
4

NAME

6       cfdisk - display or manipulate a disk partition table
7

SYNOPSIS

9       cfdisk [options] [device]
10

DESCRIPTION

12       cfdisk  is  a  curses-based  program for partitioning any block device.
13       The default device is /dev/sda.
14
15       Note that cfdisk provides basic partitioning functionality with a user-
16       friendly  interface.   If  you  need  advanced  features,  use fdisk(8)
17       instead.
18
19       Since version 2.25 cfdisk supports MBR (DOS), GPT,  SUN  and  SGI  disk
20       labels,  but  no  longer  provides any functionality for CHS (Cylinder-
21       Head-Sector) addressing.  CHS has never been important for  Linux,  and
22       this addressing concept does not make any sense for new devices.
23
24       Since  version  2.25 cfdisk also does not provide a 'print' command any
25       more.  This functionality is provided by  the  utilities  partx(8)  and
26       lsblk(8) in a very comfortable and rich way.
27
28       If  you  want  to  remove  an  old  partition  table from a device, use
29       wipefs(8).
30
31

OPTIONS

33       -h, --help
34              Display help text and exit.
35
36       -L, --color[=when]
37              Colorize the output.  The optional argument when  can  be  auto,
38              never  or  always.  If the when argument is omitted, it defaults
39              to auto.  The colors can be disabled, for the  current  built-in
40              default see --help output. See also the COLORS section.
41
42       -V, --version
43              Display version information and exit.
44
45       -z, --zero
46              Start  with  an  in-memory  zeroed partition table.  This option
47              does not zero the partition table on the disk; rather, it simply
48              starts the program without reading the existing partition table.
49              This option allows you to create  a  new  partition  table  from
50              scratch or from an sfdisk-compatible script.
51
52

COMMANDS

54       The  commands  for  cfdisk can be entered by pressing the corresponding
55       key (pressing Enter after the command is not  necessary).   Here  is  a
56       list of the available commands:
57
58       b      Toggle  the bootable flag of the current partition.  This allows
59              you to select which primary partition is bootable on the  drive.
60              This command may not be available for all partition label types.
61
62       d      Delete  the  current  partition.   This will convert the current
63              partition into free space and merge it with any free space imme‐
64              diately  surrounding the current partition.  A partition already
65              marked as free space or marked as unusable cannot be deleted.
66
67       h      Show the help screen.
68
69       n      Create a new partition from free space.  cfdisk then prompts you
70              for  the  size of the partition you want to create.  The default
71              size is equal to the entire available free space at the  current
72              position.
73
74              The  size  may  be  followed  by  a  multiplicative  suffix: KiB
75              (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB
76              and YiB (the "iB" is optional, e.g., "K" has the same meaning as
77              "KiB").
78
79       q      Quit the program.  This will exit the  program  without  writing
80              any data to the disk.
81
82       s      Sort  the  partitions  in  ascending  start-sector  order.  When
83              deleting and adding partitions, it is likely that the  numbering
84              of  the partitions will no longer match their order on the disk.
85              This command restores that match.
86
87       t      Change the partition type.  By default, new partitions are  cre‐
88              ated as Linux partitions.
89
90       u      Dump the current in-memory partition table to an sfdisk-compati‐
91              ble script file.
92
93              The script files are compatible between  cfdisk,  fdisk,  sfdisk
94              and   other   libfdisk   applications.   For  more  details  see
95              sfdisk(8).
96
97              It is also possible to load  an  sfdisk-script  into  cfdisk  if
98              there  is  no  partition  table  on the device or when you start
99              cfdisk with the --zero command-line option.
100
101       W      Write the partition table to disk (you must enter  an  uppercase
102              W).   Since this might destroy data on the disk, you must either
103              confirm or deny the write by entering `yes'  or  `no'.   If  you
104              enter  `yes',  cfdisk will write the partition table to disk and
105              then tell the kernel to re-read the  partition  table  from  the
106              disk.
107
108              The  re-reading of the partition table does not always work.  In
109              such a case you need to inform the kernel about any  new  parti‐
110              tions  by  using  partprobe(8)  or partx(8), or by rebooting the
111              system.
112
113       x      Toggle extra information about a partition.
114
115       Up Arrow, Down Arrow
116              Move the cursor to the previous or next partition.  If there are
117              more  partitions than can be displayed on a screen, you can dis‐
118              play the next (previous) set of partitions by moving  down  (up)
119              at the last (first) partition displayed on the screen.
120
121       Left Arrow, Right Arrow
122              Select  the preceding or the next menu item.  Hitting Enter will
123              execute the currently selected item.
124
125
126       All commands can be entered with either uppercase or lowercase  letters
127       (except  for Write).  When in a submenu or at a prompt, you can hit the
128       Esc key to return to the main menu.
129
130

COLORS

132       Implicit coloring can be disabled by creating the empty file  /etc/ter‐
133       minal-colors.d/cfdisk.disable.
134
135       See terminal-colors.d(5) for more details about colorization configura‐
136       tion.
137
138       cfdisk does not support color customization with a color-scheme file.
139
140

ENVIRONMENT

142       CFDISK_DEBUG=all
143              enables cfdisk debug output.
144
145       LIBFDISK_DEBUG=all
146              enables libfdisk debug output.
147
148       LIBBLKID_DEBUG=all
149              enables libblkid debug output.
150
151       LIBSMARTCOLS_DEBUG=all
152              enables libsmartcols debug output.
153
154       LIBSMARTCOLS_DEBUG_PADDING=on
155              use  visible  padding  characters.  Requires  enabled  LIBSMART‐
156              COLS_DEBUG.
157
158

SEE ALSO

160       fdisk(8), parted(8), partprobe(8), partx(8), sfdisk(8)
161

AUTHOR

163       Karel Zak <kzak@redhat.com>
164
165       The  current cfdisk implementation is based on the original cfdisk from
166       Kevin E. Martin (martin@cs.unc.edu).
167
168

AVAILABILITY

170       The cfdisk command is part of the util-linux package and  is  available
171       from https://www.kernel.org/pub/linux/utils/util-linux/.
172
173
174
175util-linux                        March 2014                         CFDISK(8)
Impressum