Open In App

cfdisk command in Linux with examples

cfdisk command is used to create, delete, and modify partitions on a disk device. It displays or manipulates the disk partition table by providing a text-based “graphical” interface.

cfdisk /dev/sda

Example: After running you get a prompt like this: Choose gpt from the list. Now you will see a partition table like this: Creating Partitions Using cfdisk:



Options:

Other command line commands: While using cfdisk you can use simple commands just like we use in vi editor for saving, inserting etc. The list of commands are as follows:



Example: Sample output when we use “?” or “h”

Article Tags :