]>
Commit | Line | Data |
---|---|---|
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 | 16 | cfdisk \- 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 | 23 | is a curses-based program for partitioning any block device. |
9bef99cc | 24 | The default device is |
46f057ed | 25 | .IR /dev/sda . |
6dbe3af9 | 26 | |
096ff740 KZ |
27 | Note that |
28 | .B cfdisk | |
9bef99cc BS |
29 | provides basic partitioning functionality with a user-friendly interface. |
30 | If you need advanced features, use | |
31 | .BR fdisk (8) | |
32 | instead. | |
096ff740 | 33 | |
0eeeec33 | 34 | Since version 2.25 |
9bef99cc BS |
35 | .B cfdisk |
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 | |
0eeeec33 KZ |
39 | sense for new devices. |
40 | ||
41 | Since version 2.25 | |
9bef99cc BS |
42 | .B cfdisk |
43 | also does not provide a 'print' command any more. | |
44 | This functionality is provided by the utilities | |
0eeeec33 KZ |
45 | .BR partx (8) |
46 | and | |
47 | .BR lsblk (8) | |
df0a8e7a | 48 | in a very comfortable and rich way. |
0eeeec33 | 49 | |
df0a8e7a | 50 | If 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 | 56 | Display help text and exit. |
9bef99cc BS |
57 | .TP |
58 | .BR \-L , " \-\-color" [ = \fIwhen\fR] | |
5d51dc2a KZ |
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, | |
2bb3aa36 | 61 | it defaults to \fBauto\fR. The colors can be disabled, for the current built-in default |
5d51dc2a | 62 | see \fB\-\-help\fR output. See also the COLORS section. |
9bef99cc BS |
63 | .TP |
64 | .BR \-V , " \-\-version" | |
0eeeec33 | 65 | Display version information and exit. |
9bef99cc BS |
66 | .TP |
67 | .BR \-z , " \-\-zero" | |
68 | Start with an in-memory zeroed partition table. This option does not zero the | |
d121efdb | 69 | partition table on the disk; rather, it simply starts the program without |
c7b1fbb4 BS |
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. | |
6dbe3af9 KZ |
72 | |
73 | .SH COMMANDS | |
9bef99cc | 74 | The commands for |
6dbe3af9 | 75 | .B cfdisk |
9bef99cc | 76 | can be entered by pressing the corresponding key (pressing |
6dbe3af9 KZ |
77 | .I Enter |
78 | after the command is not necessary). Here is a list of the available | |
79 | commands: | |
80 | .TP | |
81 | .B b | |
df0a8e7a | 82 | Toggle the bootable flag of the current partition. This allows you to |
9bef99cc | 83 | select which primary partition is bootable on the drive. This command may not |
df0a8e7a | 84 | be available for all partition label types. |
6dbe3af9 KZ |
85 | .TP |
86 | .B d | |
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. | |
91 | .TP | |
6dbe3af9 | 92 | .B h |
9bef99cc | 93 | Show the help screen. |
6dbe3af9 | 94 | .TP |
6dbe3af9 | 95 | .B n |
9bef99cc | 96 | Create a new partition from free space. |
6dbe3af9 | 97 | .B cfdisk |
9bef99cc | 98 | then prompts you for the size of the partition you want to create. |
0eeeec33 KZ |
99 | The default size is equal to the entire available free space at the current |
100 | position. | |
6dbe3af9 | 101 | |
9bef99cc BS |
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"). | |
6dbe3af9 KZ |
105 | .TP |
106 | .B q | |
df0a8e7a OO |
107 | Quit the program. This will exit the program without writing any data to |
108 | the disk. | |
6dbe3af9 | 109 | .TP |
c7b1fbb4 BS |
110 | .B s |
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. | |
a89eafed | 114 | .TP |
6dbe3af9 | 115 | .B t |
0eeeec33 | 116 | Change the partition type. By default, new partitions are created as |
6dbe3af9 | 117 | .I Linux |
0eeeec33 | 118 | partitions. |
6dbe3af9 | 119 | .TP |
c7b1fbb4 BS |
120 | .B u |
121 | Dump the current in-memory partition table to an sfdisk-compatible script file. | |
122 | .sp | |
123 | The script files are compatible between \fBcfdisk\fR, \fBfdisk\fR, \fBsfdisk\fR | |
124 | and other libfdisk applications. For more details see | |
125 | .BR sfdisk (8). | |
126 | .sp | |
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. | |
130 | .TP | |
6dbe3af9 | 131 | .B W |
eb2be4fd | 132 | Write the partition table to disk (you must enter an uppercase W). Since |
6dbe3af9 KZ |
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', | |
135 | .B cfdisk | |
eb2be4fd | 136 | will write the partition table to disk and then tell the kernel to re-read the |
0eeeec33 KZ |
137 | partition table from the disk. |
138 | ||
9bef99cc BS |
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 | |
141 | .BR partprobe (8) | |
142 | or | |
143 | .BR partx (8), | |
144 | or by rebooting the system. | |
6dbe3af9 | 145 | .TP |
dda7fe12 OO |
146 | .B x |
147 | Toggle extra information about a partition. | |
148 | .TP | |
eb2be4fd BS |
149 | .IR "Up Arrow" , " Down Arrow" |
150 | Move the cursor to the previous or next partition. If there are more | |
6dbe3af9 KZ |
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. | |
c7b1fbb4 BS |
154 | .TP |
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. | |
6dbe3af9 | 158 | |
0eeeec33 | 159 | .PP |
9bef99cc | 160 | All commands can be entered with either uppercase or lowercase |
6dbe3af9 | 161 | letters (except for |
eb2be4fd | 162 | .BR W rite). |
c7b1fbb4 BS |
163 | When in a submenu or at a prompt, you can hit the |
164 | .I Esc | |
9bef99cc | 165 | key to return to the main menu. |
eb2be4fd | 166 | |
210bb492 | 167 | .SH COLORS |
9bef99cc BS |
168 | Implicit coloring can be disabled by creating the empty file |
169 | .IR /etc/terminal-colors.d/cfdisk.disable . | |
210bb492 | 170 | |
538c1856 KZ |
171 | See |
172 | .BR terminal-colors.d (5) | |
173 | for more details about colorization configuration. | |
174 | ||
175 | .B cfdisk | |
9bef99cc | 176 | does not support color customization with a color-scheme file. |
210bb492 | 177 | |
68e422ec | 178 | .SH ENVIRONMENT |
47dd6918 KZ |
179 | .IP CFDISK_DEBUG=all |
180 | enables cfdisk debug output. | |
68e422ec KZ |
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. | |
37948503 KZ |
187 | .IP LIBSMARTCOLS_DEBUG_PADDING=on |
188 | use visible padding characters. Requires enabled LIBSMARTCOLS_DEBUG. | |
68e422ec | 189 | |
6dbe3af9 | 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 |
197 | Karel Zak <kzak@redhat.com> |
198 | .PP | |
9bef99cc | 199 | The current cfdisk implementation is based on the original cfdisk |
0eeeec33 | 200 | from Kevin E. Martin (martin@cs.unc.edu). |
86d62711 KZ |
201 | |
202 | .SH AVAILABILITY | |
601d12fb | 203 | The cfdisk command is part of the util-linux package and is available from |
d673b74e | 204 | https://www.kernel.org/pub/linux/utils/util-linux/. |