2006-12-06 17:25:32 -06:00
|
|
|
.\" cfdisk.8 -- man page for cfdisk
|
|
|
|
.\" Copyright 1994 Kevin E. Martin (martin@cs.unc.edu)
|
2014-03-10 07:21:39 -05:00
|
|
|
.\" Copyright (C) 2014 Karel Zak <kzak@redhat.com>
|
2006-12-06 17:25:32 -06:00
|
|
|
.\"
|
|
|
|
.\" Permission is granted to make and distribute verbatim copies of this
|
|
|
|
.\" manual provided the copyright notice and this permission notice are
|
|
|
|
.\" preserved on all copies.
|
|
|
|
.\"
|
|
|
|
.\" Permission is granted to copy and distribute modified versions of this
|
|
|
|
.\" manual under the conditions for verbatim copying, provided that the
|
|
|
|
.\" entire resulting derived work is distributed under the terms of a
|
|
|
|
.\" permission notice identical to this one.
|
|
|
|
.\"
|
2014-03-10 07:21:39 -05:00
|
|
|
.TH CFDISK 8 "March 2014" "util-linux" "System Administration"
|
2006-12-06 17:25:32 -06:00
|
|
|
.SH NAME
|
2014-04-08 02:48:48 -05:00
|
|
|
cfdisk \- display or manipulate a disk partition table
|
2006-12-06 17:25:32 -06:00
|
|
|
.SH SYNOPSIS
|
2009-07-22 04:29:05 -05:00
|
|
|
.B cfdisk
|
2014-12-14 13:45:29 -06:00
|
|
|
[options]
|
2009-07-22 04:29:05 -05:00
|
|
|
.RI [ device ]
|
2006-12-06 17:25:32 -06:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.B cfdisk
|
2014-03-10 07:21:39 -05:00
|
|
|
is a curses-based program for partitioning any block device.
|
2014-07-14 15:53:34 -05:00
|
|
|
The default device is
|
2016-12-03 14:13:59 -06:00
|
|
|
.IR /dev/sda .
|
2006-12-06 17:25:32 -06:00
|
|
|
|
2012-01-17 08:48:14 -06:00
|
|
|
Note that
|
|
|
|
.B cfdisk
|
2014-07-14 15:53:34 -05:00
|
|
|
provides basic partitioning functionality with a user-friendly interface.
|
|
|
|
If you need advanced features, use
|
|
|
|
.BR fdisk (8)
|
|
|
|
instead.
|
2012-01-17 08:48:14 -06:00
|
|
|
|
2014-03-10 07:21:39 -05:00
|
|
|
Since version 2.25
|
2014-07-14 15:53:34 -05:00
|
|
|
.B cfdisk
|
|
|
|
supports MBR (DOS), GPT, SUN and SGI disk labels, but no longer provides any
|
|
|
|
functionality for CHS (Cylinder-Head-Sector) addressing. CHS has
|
|
|
|
never been important for Linux, and this addressing concept does not make any
|
2014-03-10 07:21:39 -05:00
|
|
|
sense for new devices.
|
|
|
|
|
|
|
|
Since version 2.25
|
2014-07-14 15:53:34 -05:00
|
|
|
.B cfdisk
|
|
|
|
also does not provide a 'print' command any more.
|
|
|
|
This functionality is provided by the utilities
|
2014-03-10 07:21:39 -05:00
|
|
|
.BR partx (8)
|
|
|
|
and
|
|
|
|
.BR lsblk (8)
|
2014-04-08 02:48:48 -05:00
|
|
|
in a very comfortable and rich way.
|
2014-03-10 07:21:39 -05:00
|
|
|
|
2014-04-08 02:48:48 -05:00
|
|
|
If you want to remove an old partition table from a device, use
|
2014-03-10 07:21:39 -05:00
|
|
|
.BR wipefs (8).
|
2006-12-06 17:25:32 -06:00
|
|
|
|
2014-03-10 07:21:39 -05:00
|
|
|
.SH OPTIONS
|
2014-07-14 15:53:34 -05:00
|
|
|
.TP
|
|
|
|
.BR \-h , " \-\-help"
|
2014-03-10 07:21:39 -05:00
|
|
|
Display help text and exit.
|
2014-07-14 15:53:34 -05:00
|
|
|
.TP
|
|
|
|
.BR \-L , " \-\-color" [ = \fIwhen\fR]
|
2015-02-25 05:37:55 -06:00
|
|
|
Colorize the output. The optional argument \fIwhen\fP
|
|
|
|
can be \fBauto\fR, \fBnever\fR or \fBalways\fR. If the \fIwhen\fR argument is omitted,
|
2019-08-28 18:25:57 -05:00
|
|
|
it defaults to \fBauto\fR. The colors can be disabled, for the current built-in default
|
2015-02-25 05:37:55 -06:00
|
|
|
see \fB\-\-help\fR output. See also the COLORS section.
|
2014-07-14 15:53:34 -05:00
|
|
|
.TP
|
2020-05-27 09:58:08 -05:00
|
|
|
\fB\-\-lock\fR[=\fImode\fR]
|
|
|
|
Use exclusive BSD lock for device or file it operates. The optional argument
|
|
|
|
\fImode\fP can be \fByes\fR, \fBno\fR (or 1 and 0) or \fBnonblock\fR. If the \fImode\fR
|
|
|
|
argument is omitted, it defaults to \fB"yes"\fR. This option overwrites
|
|
|
|
environment variable \fB$LOCK_BLOCK_DEVICE\fR. The default is not to use any
|
|
|
|
lock at all, but it's recommended to avoid collisions with udevd or other
|
|
|
|
tools.
|
|
|
|
.TP
|
2014-07-14 15:53:34 -05:00
|
|
|
.BR \-V , " \-\-version"
|
2014-03-10 07:21:39 -05:00
|
|
|
Display version information and exit.
|
2014-07-14 15:53:34 -05:00
|
|
|
.TP
|
|
|
|
.BR \-z , " \-\-zero"
|
|
|
|
Start with an in-memory zeroed partition table. This option does not zero the
|
2014-06-20 05:17:53 -05:00
|
|
|
partition table on the disk; rather, it simply starts the program without
|
2015-02-01 08:00:13 -06:00
|
|
|
reading the existing partition table. This option allows you to create a new
|
|
|
|
partition table from scratch or from an sfdisk-compatible script.
|
2006-12-06 17:25:32 -06:00
|
|
|
|
|
|
|
.SH COMMANDS
|
2014-07-14 15:53:34 -05:00
|
|
|
The commands for
|
2006-12-06 17:25:32 -06:00
|
|
|
.B cfdisk
|
2014-07-14 15:53:34 -05:00
|
|
|
can be entered by pressing the corresponding key (pressing
|
2006-12-06 17:25:32 -06:00
|
|
|
.I Enter
|
|
|
|
after the command is not necessary). Here is a list of the available
|
|
|
|
commands:
|
|
|
|
.TP
|
|
|
|
.B b
|
2014-04-08 02:48:48 -05:00
|
|
|
Toggle the bootable flag of the current partition. This allows you to
|
2014-07-14 15:53:34 -05:00
|
|
|
select which primary partition is bootable on the drive. This command may not
|
2014-04-08 02:48:48 -05:00
|
|
|
be available for all partition label types.
|
2006-12-06 17:25:32 -06:00
|
|
|
.TP
|
|
|
|
.B d
|
|
|
|
Delete the current partition. This will convert the current partition
|
|
|
|
into free space and merge it with any free space immediately
|
|
|
|
surrounding the current partition. A partition already marked as free
|
|
|
|
space or marked as unusable cannot be deleted.
|
|
|
|
.TP
|
|
|
|
.B h
|
2014-07-14 15:53:34 -05:00
|
|
|
Show the help screen.
|
2006-12-06 17:25:32 -06:00
|
|
|
.TP
|
|
|
|
.B n
|
2014-07-14 15:53:34 -05:00
|
|
|
Create a new partition from free space.
|
2006-12-06 17:25:32 -06:00
|
|
|
.B cfdisk
|
2014-07-14 15:53:34 -05:00
|
|
|
then prompts you for the size of the partition you want to create.
|
2014-03-10 07:21:39 -05:00
|
|
|
The default size is equal to the entire available free space at the current
|
|
|
|
position.
|
2006-12-06 17:25:32 -06:00
|
|
|
|
2014-07-14 15:53:34 -05:00
|
|
|
The size may be followed by a multiplicative suffix: KiB (=1024),
|
|
|
|
MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB
|
2019-12-14 16:42:47 -06:00
|
|
|
(the "iB" is optional, e.g., "K" has the same meaning as "KiB").
|
2006-12-06 17:25:32 -06:00
|
|
|
.TP
|
|
|
|
.B q
|
2014-04-08 02:48:48 -05:00
|
|
|
Quit the program. This will exit the program without writing any data to
|
|
|
|
the disk.
|
2006-12-06 17:25:32 -06:00
|
|
|
.TP
|
2015-02-01 08:00:13 -06:00
|
|
|
.B s
|
|
|
|
Sort the partitions in ascending start-sector order. When deleting and
|
|
|
|
adding partitions, it is likely that the numbering of the partitions will
|
|
|
|
no longer match their order on the disk. This command restores that match.
|
2014-11-12 09:12:39 -06:00
|
|
|
.TP
|
2006-12-06 17:25:32 -06:00
|
|
|
.B t
|
2014-03-10 07:21:39 -05:00
|
|
|
Change the partition type. By default, new partitions are created as
|
2006-12-06 17:25:32 -06:00
|
|
|
.I Linux
|
2014-03-10 07:21:39 -05:00
|
|
|
partitions.
|
2006-12-06 17:25:32 -06:00
|
|
|
.TP
|
2015-02-01 08:00:13 -06:00
|
|
|
.B u
|
|
|
|
Dump the current in-memory partition table to an sfdisk-compatible script file.
|
|
|
|
.sp
|
|
|
|
The script files are compatible between \fBcfdisk\fR, \fBfdisk\fR, \fBsfdisk\fR
|
|
|
|
and other libfdisk applications. For more details see
|
|
|
|
.BR sfdisk (8).
|
|
|
|
.sp
|
|
|
|
It is also possible to load an sfdisk-script into \fBcfdisk\fR if there is
|
|
|
|
no partition table on the device or when you start \fBcfdisk\fR with the
|
|
|
|
\fB--zero\fR command-line option.
|
|
|
|
.TP
|
2006-12-06 17:25:32 -06:00
|
|
|
.B W
|
2013-06-16 07:37:52 -05:00
|
|
|
Write the partition table to disk (you must enter an uppercase W). Since
|
2006-12-06 17:25:32 -06:00
|
|
|
this might destroy data on the disk, you must either confirm or deny
|
|
|
|
the write by entering `yes' or `no'. If you enter `yes',
|
|
|
|
.B cfdisk
|
2013-06-16 07:37:52 -05:00
|
|
|
will write the partition table to disk and then tell the kernel to re-read the
|
2014-03-10 07:21:39 -05:00
|
|
|
partition table from the disk.
|
|
|
|
|
2014-07-14 15:53:34 -05:00
|
|
|
The re-reading of the partition table does not always work. In such a
|
|
|
|
case you need to inform the kernel about any new partitions by using
|
|
|
|
.BR partprobe (8)
|
|
|
|
or
|
|
|
|
.BR partx (8),
|
|
|
|
or by rebooting the system.
|
2006-12-06 17:25:32 -06:00
|
|
|
.TP
|
2015-02-20 02:41:19 -06:00
|
|
|
.B x
|
|
|
|
Toggle extra information about a partition.
|
|
|
|
.TP
|
2013-06-16 07:37:52 -05:00
|
|
|
.IR "Up Arrow" , " Down Arrow"
|
|
|
|
Move the cursor to the previous or next partition. If there are more
|
2006-12-06 17:25:32 -06:00
|
|
|
partitions than can be displayed on a screen, you can display the next
|
|
|
|
(previous) set of partitions by moving down (up) at the last (first)
|
|
|
|
partition displayed on the screen.
|
2015-02-01 08:00:13 -06:00
|
|
|
.TP
|
|
|
|
.IR "Left Arrow" , " Right Arrow"
|
|
|
|
Select the preceding or the next menu item. Hitting \fIEnter\fR will
|
|
|
|
execute the currently selected item.
|
2006-12-06 17:25:32 -06:00
|
|
|
|
2014-03-10 07:21:39 -05:00
|
|
|
.PP
|
2014-07-14 15:53:34 -05:00
|
|
|
All commands can be entered with either uppercase or lowercase
|
2006-12-06 17:25:32 -06:00
|
|
|
letters (except for
|
2013-06-16 07:37:52 -05:00
|
|
|
.BR W rite).
|
2015-02-01 08:00:13 -06:00
|
|
|
When in a submenu or at a prompt, you can hit the
|
|
|
|
.I Esc
|
2014-07-14 15:53:34 -05:00
|
|
|
key to return to the main menu.
|
2013-06-16 07:37:52 -05:00
|
|
|
|
2014-03-11 05:49:52 -05:00
|
|
|
.SH COLORS
|
2014-07-14 15:53:34 -05:00
|
|
|
Implicit coloring can be disabled by creating the empty file
|
|
|
|
.IR /etc/terminal-colors.d/cfdisk.disable .
|
2014-03-11 05:49:52 -05:00
|
|
|
|
2014-05-12 03:27:53 -05:00
|
|
|
See
|
|
|
|
.BR terminal-colors.d (5)
|
|
|
|
for more details about colorization configuration.
|
|
|
|
|
|
|
|
.B cfdisk
|
2014-07-14 15:53:34 -05:00
|
|
|
does not support color customization with a color-scheme file.
|
2014-03-11 05:49:52 -05:00
|
|
|
|
2014-11-03 06:13:54 -06:00
|
|
|
.SH ENVIRONMENT
|
2015-02-03 04:16:46 -06:00
|
|
|
.IP CFDISK_DEBUG=all
|
|
|
|
enables cfdisk debug output.
|
2014-11-03 06:13:54 -06:00
|
|
|
.IP LIBFDISK_DEBUG=all
|
|
|
|
enables libfdisk debug output.
|
|
|
|
.IP LIBBLKID_DEBUG=all
|
|
|
|
enables libblkid debug output.
|
|
|
|
.IP LIBSMARTCOLS_DEBUG=all
|
|
|
|
enables libsmartcols debug output.
|
2016-09-07 05:25:06 -05:00
|
|
|
.IP LIBSMARTCOLS_DEBUG_PADDING=on
|
|
|
|
use visible padding characters. Requires enabled LIBSMARTCOLS_DEBUG.
|
2020-05-27 09:58:08 -05:00
|
|
|
.IP LOCK_BLOCK_DEVICE=<mode>
|
|
|
|
use exclusive BSD lock. The mode is "1" or "0". See \fB\-\-lock\fR for more details.
|
2014-11-03 06:13:54 -06:00
|
|
|
|
2020-05-19 07:51:28 -05:00
|
|
|
.SH AUTHORS
|
2014-03-10 07:21:39 -05:00
|
|
|
Karel Zak <kzak@redhat.com>
|
|
|
|
.PP
|
2014-07-14 15:53:34 -05:00
|
|
|
The current cfdisk implementation is based on the original cfdisk
|
2014-03-10 07:21:39 -05:00
|
|
|
from Kevin E. Martin (martin@cs.unc.edu).
|
2007-07-02 18:17:04 -05:00
|
|
|
|
2020-05-21 02:28:21 -05:00
|
|
|
.SH SEE ALSO
|
|
|
|
.BR fdisk (8),
|
|
|
|
.BR parted (8),
|
|
|
|
.BR partprobe (8),
|
|
|
|
.BR partx (8),
|
|
|
|
.BR sfdisk (8)
|
2007-07-02 18:17:04 -05:00
|
|
|
.SH AVAILABILITY
|
2010-11-30 04:41:59 -06:00
|
|
|
The cfdisk command is part of the util-linux package and is available from
|
2016-12-17 02:06:57 -06:00
|
|
|
https://www.kernel.org/pub/linux/utils/util-linux/.
|