Function Description
fdisk/sfdisk/cfdisk Legacy disk tools for BIOS systems (sfdisk for scripts)
gdisk/sgdisk/cgdisk Disk tools for UEFI/GTP systems (sgdisk for scripts)
parted Advanced disk tool with filesystem options
Disk Tool Function
fdisk gdisk parted
Help menu m ? help
Print partitions on screen p p print
Create partition n n mkpart TYPE START END
Create partition with FS mkpartfs TYPE FS-TYPE START END
Make FS on partition mkfs NUMBER FS-TYPE
Show detailed info
i print all
rm <number>
Delete partition d d
List partition types l l
Change partition type t t
Expert menu x x
Transpose partitions x t move NUMBER START END
Resize partition x s resize NUMBER START END
Replicate partition table x u Verify disk v
v
Write table to disk w
w
Quit q
q
Other Disk Tools Description
quit
lsblk List block devices in tree format
blkid List block devices with UUID and Filesystem Type
partprobe Force the kernel to re-probe the disks
fixparts/testdisk Fix and restore partitions and files
wipefs/shred Zero the disk erasing all files/erase single file
mkfs,mke2fs Make filesystem on partition (format)
tune2fs Change filesystem options
fsck Check filesystem
mkswap Make swap partitions
dd/ddrescue/dd-rescue Duplicate disks