man-pages/man8/cfdisk.8.html
2021-03-31 01:06:50 +01:00

295 lines
8.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of CFDISK</TITLE>
</HEAD><BODY>
<H1>CFDISK</H1>
Section: System Administration (8)<BR>Updated: March 2014<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
cfdisk - display or manipulate a disk partition table
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>cfdisk</B>
[options]
[<I>device</I>]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>cfdisk</B>
is a curses-based program for partitioning any block device.
The default device is
<I>/dev/sda</I>.
<P>
Note that
<B>cfdisk</B>
provides basic partitioning functionality with a user-friendly interface.
If you need advanced features, use
<B><A HREF="/cgi-bin/man/man2html?8+fdisk">fdisk</A></B>(8)
instead.
<P>
Since version 2.25
<B>cfdisk</B>
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
sense for new devices.
<P>
Since version 2.25
<B>cfdisk</B>
also does not provide a 'print' command any more.
This functionality is provided by the utilities
<B><A HREF="/cgi-bin/man/man2html?8+partx">partx</A></B>(8)
and
<B><A HREF="/cgi-bin/man/man2html?8+lsblk">lsblk</A></B>(8)
in a very comfortable and rich way.
<P>
If you want to remove an old partition table from a device, use
<B><A HREF="/cgi-bin/man/man2html?8+wipefs">wipefs</A></B>(8).
<P>
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="1"><B>-h</B>,<B> --help</B>
<DD>
Display help text and exit.
<DT id="2"><B>-L</B>,<B> --color</B>[<B>=</B><I>when</I>]
<DD>
Colorize the output. The optional argument <I>when</I>
can be <B>auto</B>, <B>never</B> or <B>always</B>. If the <I>when</I> argument is omitted,
it defaults to <B>auto</B>. The colors can be disabled, for the current built-in default
see <B>--help</B> output. See also the COLORS section.
<DT id="3"><B>-V</B>,<B> --version</B>
<DD>
Display version information and exit.
<DT id="4"><B>-z</B>,<B> --zero</B>
<DD>
Start with an in-memory zeroed partition table. This option does not zero the
partition table on the disk; rather, it simply starts the program without
reading the existing partition table. This option allows you to create a new
partition table from scratch or from an sfdisk-compatible script.
<P>
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>COMMANDS</H2>
The commands for
<B>cfdisk</B>
can be entered by pressing the corresponding key (pressing
<I>Enter</I>
after the command is not necessary). Here is a list of the available
commands:
<DL COMPACT>
<DT id="5"><B>b</B>
<DD>
Toggle the bootable flag of the current partition. This allows you to
select which primary partition is bootable on the drive. This command may not
be available for all partition label types.
<DT id="6"><B>d</B>
<DD>
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.
<DT id="7"><B>h</B>
<DD>
Show the help screen.
<DT id="8"><B>n</B>
<DD>
Create a new partition from free space.
<B>cfdisk</B>
then prompts you for the size of the partition you want to create.
The default size is equal to the entire available free space at the current
position.
<P>
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
(the &quot;iB&quot; is optional, e.g. &quot;K&quot; has the same meaning as &quot;KiB&quot;).
<DT id="9"><B>q</B>
<DD>
Quit the program. This will exit the program without writing any data to
the disk.
<DT id="10"><B>s</B>
<DD>
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.
<DT id="11"><B>t</B>
<DD>
Change the partition type. By default, new partitions are created as
<I>Linux</I>
partitions.
<DT id="12"><B>u</B>
<DD>
Dump the current in-memory partition table to an sfdisk-compatible script file.
<P>
The script files are compatible between <B>cfdisk</B>, <B>fdisk</B>, <B>sfdisk</B>
and other libfdisk applications. For more details see
<B><A HREF="/cgi-bin/man/man2html?8+sfdisk">sfdisk</A></B>(8).
<P>
It is also possible to load an sfdisk-script into <B>cfdisk</B> if there is
no partition table on the device or when you start <B>cfdisk</B> with the
<B>--zero</B> command-line option.
<DT id="13"><B>W</B>
<DD>
Write the partition table to disk (you must enter an uppercase W). Since
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</B>
will write the partition table to disk and then tell the kernel to re-read the
partition table from the disk.
<P>
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
<B><A HREF="/cgi-bin/man/man2html?8+partprobe">partprobe</A></B>(8)
or
<B><A HREF="/cgi-bin/man/man2html?8+partx">partx</A></B>(8),
or by rebooting the system.
<DT id="14"><B>x</B>
<DD>
Toggle extra information about a partition.
<DT id="15"><I>Up Arrow</I>,<I> Down Arrow</I>
<DD>
Move the cursor to the previous or next partition. If there are more
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.
<DT id="16"><I>Left Arrow</I>,<I> Right Arrow</I>
<DD>
Select the preceding or the next menu item. Hitting <I>Enter</I> will
execute the currently selected item.
<P>
</DL>
<P>
All commands can be entered with either uppercase or lowercase
letters (except for
<B>W</B>rite).
When in a submenu or at a prompt, you can hit the
<I>Esc</I>
key to return to the main menu.
<P>
<A NAME="lbAG">&nbsp;</A>
<H2>COLORS</H2>
Implicit coloring can be disabled by creating the empty file
<I>/etc/terminal-colors.d/cfdisk.disable</I>.
<P>
See
<B><A HREF="/cgi-bin/man/man2html?5+terminal-colors.d">terminal-colors.d</A></B>(5)
for more details about colorization configuration.
<P>
<B>cfdisk</B>
does not support color customization with a color-scheme file.
<P>
<A NAME="lbAH">&nbsp;</A>
<H2>ENVIRONMENT</H2>
<DL COMPACT>
<DT id="17">CFDISK_DEBUG=all<DD>
enables cfdisk debug output.
<DT id="18">LIBFDISK_DEBUG=all<DD>
enables libfdisk debug output.
<DT id="19">LIBBLKID_DEBUG=all<DD>
enables libblkid debug output.
<DT id="20">LIBSMARTCOLS_DEBUG=all<DD>
enables libsmartcols debug output.
<DT id="21">LIBSMARTCOLS_DEBUG_PADDING=on<DD>
use visible padding characters. Requires enabled LIBSMARTCOLS_DEBUG.
<P>
</DL>
<A NAME="lbAI">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?8+fdisk">fdisk</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?8+parted">parted</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?8+partprobe">partprobe</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?8+partx">partx</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?8+sfdisk">sfdisk</A></B>(8)
<A NAME="lbAJ">&nbsp;</A>
<H2>AUTHOR</H2>
Karel Zak &lt;<A HREF="mailto:kzak@redhat.com">kzak@redhat.com</A>&gt;
<P>
The current cfdisk implementation is based on the original cfdisk
from Kevin E. Martin (<A HREF="mailto:martin@cs.unc.edu">martin@cs.unc.edu</A>).
<P>
<A NAME="lbAK">&nbsp;</A>
<H2>AVAILABILITY</H2>
The cfdisk command is part of the util-linux package and is available from
<A HREF="https://www.kernel.org/pub/linux/utils/util-linux/.">https://www.kernel.org/pub/linux/utils/util-linux/.</A>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="22"><A HREF="#lbAB">NAME</A><DD>
<DT id="23"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="24"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="25"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="26"><A HREF="#lbAF">COMMANDS</A><DD>
<DT id="27"><A HREF="#lbAG">COLORS</A><DD>
<DT id="28"><A HREF="#lbAH">ENVIRONMENT</A><DD>
<DT id="29"><A HREF="#lbAI">SEE ALSO</A><DD>
<DT id="30"><A HREF="#lbAJ">AUTHOR</A><DD>
<DT id="31"><A HREF="#lbAK">AVAILABILITY</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:11 GMT, March 31, 2021
</BODY>
</HTML>