]> git.ipfire.org Git - thirdparty/util-linux.git/blame - disk-utils/cfdisk.8
docs: (man) remove double quotes (") in .SH lines
[thirdparty/util-linux.git] / disk-utils / cfdisk.8
CommitLineData
6dbe3af9
KZ
1.\" cfdisk.8 -- man page for cfdisk
2.\" Copyright 1994 Kevin E. Martin (martin@cs.unc.edu)
0eeeec33 3.\" Copyright (C) 2014 Karel Zak <kzak@redhat.com>
6dbe3af9
KZ
4.\"
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.
8.\"
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.
13.\"
0eeeec33 14.TH CFDISK 8 "March 2014" "util-linux" "System Administration"
6dbe3af9 15.SH NAME
df0a8e7a 16cfdisk \- display or manipulate a disk partition table
6dbe3af9 17.SH SYNOPSIS
46554928 18.B cfdisk
f49ccec2 19[options]
46554928 20.RI [ device ]
6dbe3af9
KZ
21.SH DESCRIPTION
22.B cfdisk
0eeeec33 23is a curses-based program for partitioning any block device.
9bef99cc 24The default device is
46f057ed 25.IR /dev/sda .
6dbe3af9 26
096ff740
KZ
27Note that
28.B cfdisk
9bef99cc
BS
29provides basic partitioning functionality with a user-friendly interface.
30If you need advanced features, use
31.BR fdisk (8)
32instead.
096ff740 33
0eeeec33 34Since version 2.25
9bef99cc
BS
35.B cfdisk
36supports MBR (DOS), GPT, SUN and SGI disk labels, but no longer provides any
37functionality for CHS (Cylinder-Head-Sector) addressing. CHS has
38never been important for Linux, and this addressing concept does not make any
0eeeec33
KZ
39sense for new devices.
40
41Since version 2.25
9bef99cc
BS
42.B cfdisk
43also does not provide a 'print' command any more.
44This functionality is provided by the utilities
0eeeec33
KZ
45.BR partx (8)
46and
47.BR lsblk (8)
df0a8e7a 48in a very comfortable and rich way.
0eeeec33 49
df0a8e7a 50If you want to remove an old partition table from a device, use
0eeeec33 51.BR wipefs (8).
6dbe3af9 52
0eeeec33 53.SH OPTIONS
9bef99cc
BS
54.TP
55.BR \-h , " \-\-help"
0eeeec33 56Display help text and exit.
9bef99cc
BS
57.TP
58.BR \-L , " \-\-color" [ = \fIwhen\fR]
5d51dc2a
KZ
59Colorize the output. The optional argument \fIwhen\fP
60can be \fBauto\fR, \fBnever\fR or \fBalways\fR. If the \fIwhen\fR argument is omitted,
2bb3aa36 61it defaults to \fBauto\fR. The colors can be disabled, for the current built-in default
5d51dc2a 62see \fB\-\-help\fR output. See also the COLORS section.
9bef99cc
BS
63.TP
64.BR \-V , " \-\-version"
0eeeec33 65Display version information and exit.
9bef99cc
BS
66.TP
67.BR \-z , " \-\-zero"
68Start with an in-memory zeroed partition table. This option does not zero the
d121efdb 69partition table on the disk; rather, it simply starts the program without
c7b1fbb4
BS
70reading the existing partition table. This option allows you to create a new
71partition table from scratch or from an sfdisk-compatible script.
6dbe3af9
KZ
72
73.SH COMMANDS
9bef99cc 74The commands for
6dbe3af9 75.B cfdisk
9bef99cc 76can be entered by pressing the corresponding key (pressing
6dbe3af9
KZ
77.I Enter
78after the command is not necessary). Here is a list of the available
79commands:
80.TP
81.B b
df0a8e7a 82Toggle the bootable flag of the current partition. This allows you to
9bef99cc 83select which primary partition is bootable on the drive. This command may not
df0a8e7a 84be available for all partition label types.
6dbe3af9
KZ
85.TP
86.B d
87Delete the current partition. This will convert the current partition
88into free space and merge it with any free space immediately
89surrounding the current partition. A partition already marked as free
90space or marked as unusable cannot be deleted.
91.TP
6dbe3af9 92.B h
9bef99cc 93Show the help screen.
6dbe3af9 94.TP
6dbe3af9 95.B n
9bef99cc 96Create a new partition from free space.
6dbe3af9 97.B cfdisk
9bef99cc 98then prompts you for the size of the partition you want to create.
0eeeec33
KZ
99The default size is equal to the entire available free space at the current
100position.
6dbe3af9 101
9bef99cc
BS
102The size may be followed by a multiplicative suffix: KiB (=1024),
103MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB
eb024893 104(the "iB" is optional, e.g., "K" has the same meaning as "KiB").
6dbe3af9
KZ
105.TP
106.B q
df0a8e7a
OO
107Quit the program. This will exit the program without writing any data to
108the disk.
6dbe3af9 109.TP
c7b1fbb4
BS
110.B s
111Sort the partitions in ascending start-sector order. When deleting and
112adding partitions, it is likely that the numbering of the partitions will
113no longer match their order on the disk. This command restores that match.
a89eafed 114.TP
6dbe3af9 115.B t
0eeeec33 116Change the partition type. By default, new partitions are created as
6dbe3af9 117.I Linux
0eeeec33 118partitions.
6dbe3af9 119.TP
c7b1fbb4
BS
120.B u
121Dump the current in-memory partition table to an sfdisk-compatible script file.
122.sp
123The script files are compatible between \fBcfdisk\fR, \fBfdisk\fR, \fBsfdisk\fR
124and other libfdisk applications. For more details see
125.BR sfdisk (8).
126.sp
127It is also possible to load an sfdisk-script into \fBcfdisk\fR if there is
128no partition table on the device or when you start \fBcfdisk\fR with the
129\fB--zero\fR command-line option.
130.TP
6dbe3af9 131.B W
eb2be4fd 132Write the partition table to disk (you must enter an uppercase W). Since
6dbe3af9
KZ
133this might destroy data on the disk, you must either confirm or deny
134the write by entering `yes' or `no'. If you enter `yes',
135.B cfdisk
eb2be4fd 136will write the partition table to disk and then tell the kernel to re-read the
0eeeec33
KZ
137partition table from the disk.
138
9bef99cc
BS
139The re-reading of the partition table does not always work. In such a
140case you need to inform the kernel about any new partitions by using
141.BR partprobe (8)
142or
143.BR partx (8),
144or by rebooting the system.
6dbe3af9 145.TP
dda7fe12
OO
146.B x
147Toggle extra information about a partition.
148.TP
eb2be4fd
BS
149.IR "Up Arrow" , " Down Arrow"
150Move the cursor to the previous or next partition. If there are more
6dbe3af9
KZ
151partitions 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)
153partition displayed on the screen.
c7b1fbb4
BS
154.TP
155.IR "Left Arrow" , " Right Arrow"
156Select the preceding or the next menu item. Hitting \fIEnter\fR will
157execute the currently selected item.
6dbe3af9 158
0eeeec33 159.PP
9bef99cc 160All commands can be entered with either uppercase or lowercase
6dbe3af9 161letters (except for
eb2be4fd 162.BR W rite).
c7b1fbb4
BS
163When in a submenu or at a prompt, you can hit the
164.I Esc
9bef99cc 165key to return to the main menu.
eb2be4fd 166
210bb492 167.SH COLORS
9bef99cc
BS
168Implicit coloring can be disabled by creating the empty file
169.IR /etc/terminal-colors.d/cfdisk.disable .
210bb492 170
538c1856
KZ
171See
172.BR terminal-colors.d (5)
173for more details about colorization configuration.
174
175.B cfdisk
9bef99cc 176does not support color customization with a color-scheme file.
210bb492 177
68e422ec 178.SH ENVIRONMENT
47dd6918
KZ
179.IP CFDISK_DEBUG=all
180enables cfdisk debug output.
68e422ec
KZ
181.IP LIBFDISK_DEBUG=all
182enables libfdisk debug output.
183.IP LIBBLKID_DEBUG=all
184enables libblkid debug output.
185.IP LIBSMARTCOLS_DEBUG=all
186enables libsmartcols debug output.
37948503
KZ
187.IP LIBSMARTCOLS_DEBUG_PADDING=on
188use visible padding characters. Requires enabled LIBSMARTCOLS_DEBUG.
68e422ec 189
5a829806 190.SH SEE ALSO
612721db
KZ
191.BR fdisk (8),
192.BR parted (8),
c64061c9 193.BR partprobe (8),
f053ff1e
MK
194.BR partx (8),
195.BR sfdisk (8)
6dbe3af9 196.SH AUTHOR
0eeeec33
KZ
197Karel Zak <kzak@redhat.com>
198.PP
9bef99cc 199The current cfdisk implementation is based on the original cfdisk
0eeeec33 200from Kevin E. Martin (martin@cs.unc.edu).
86d62711
KZ
201
202.SH AVAILABILITY
601d12fb 203The cfdisk command is part of the util-linux package and is available from
d673b74e 204https://www.kernel.org/pub/linux/utils/util-linux/.