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       --lock[=mode]
43              Use  exclusive  BSD  lock  for  device or file it operates.  The
44              optional argument mode can be yes, no (or 1 and 0) or  nonblock.
45              If  the  mode  argument  is omitted, it defaults to "yes".  This
46              option overwrites environment variable $LOCK_BLOCK_DEVICE.   The
47              default  is  not to use any lock at all, but it's recommended to
48              avoid collisions with udevd or other tools.
49
50       -V, --version
51              Display version information and exit.
52
53       -z, --zero
54              Start with an in-memory zeroed  partition  table.   This  option
55              does not zero the partition table on the disk; rather, it simply
56              starts the program without reading the existing partition table.
57              This  option  allows  you  to  create a new partition table from
58              scratch or from an sfdisk-compatible script.
59
60

COMMANDS

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

COLORS

140       Implicit  coloring can be disabled by creating the empty file /etc/ter‐
141       minal-colors.d/cfdisk.disable.
142
143       See terminal-colors.d(5) for more details about colorization configura‐
144       tion.
145
146       cfdisk does not support color customization with a color-scheme file.
147
148

ENVIRONMENT

150       CFDISK_DEBUG=all
151              enables cfdisk debug output.
152
153       LIBFDISK_DEBUG=all
154              enables libfdisk debug output.
155
156       LIBBLKID_DEBUG=all
157              enables libblkid debug output.
158
159       LIBSMARTCOLS_DEBUG=all
160              enables libsmartcols debug output.
161
162       LIBSMARTCOLS_DEBUG_PADDING=on
163              use  visible  padding  characters.  Requires  enabled  LIBSMART‐
164              COLS_DEBUG.
165
166       LOCK_BLOCK_DEVICE=<mode>
167              use exclusive BSD lock.  The mode is "1" or "0".  See --lock for
168              more details.
169
170

AUTHORS

172       Karel Zak <kzak@redhat.com>
173
174       The  current cfdisk implementation is based on the original cfdisk from
175       Kevin E. Martin (martin@cs.unc.edu).
176
177

SEE ALSO

179       fdisk(8), parted(8), partprobe(8), partx(8), sfdisk(8)
180

AVAILABILITY

182       The cfdisk command is part of the util-linux package and  is  available
183       from https://www.kernel.org/pub/linux/utils/util-linux/.
184
185
186
187util-linux                        March 2014                         CFDISK(8)
Impressum