cfdisk
Quick Reference
Command Name:
cfdisk
Category:
disk management
Platform:
linux
Basic Usage:
Common Use Cases
- 1
Disk partitioning
Create and modify disk partitions interactively
- 2
System installation
Prepare disks for operating system installation
- 3
Storage management
Manage disk space allocation and partition layout
- 4
Dual boot setup
Configure partitions for multiple operating systems
Syntax
cfdisk [options] [device]
Options
Option | Description |
---|---|
-h, --help | Display help text and exit |
-V, --version | Display version information and exit |
-L, --color[=when] | Colorize output (auto, always, or never) |
-r, --read-only | Open device in read-only mode |
-s, --sector-size size | Specify sector size of the device |
-z, --zero | Start with an empty partition table |
--label type | Specify the partition table type (dos, gpt, etc.) |
Examples
How to Use These Examples
The examples below show common ways to use the cfdisk
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
Basic Examples:
cfdisk /dev/sda
cfdisk /dev/nvme0n1
cfdisk -r /dev/sdb
cfdisk -s /dev/sdc