fdisk [device]

Manipulate disk partition table

Arguments

NameDescription
deviceDevice to list

Options

NameDescription
--help, -hShow help for fdisk
--version, -VShow version for lsblk
--sector-size, -b <mode>Specify the sector size of the disk
--protect-boot, -BDon't erase the beginning of the first disk sector when creating a new disk label
--compatibility, -c [mode]Specify the compatibility mode, 'dos' or 'nondos'
--color, -L [when]Colorize the output
--list, -lList the partition tables for the specified devices and then exit
--list-details, -xLike --list, but provides more details
--lock [mode]Use exclusive BSD lock for device or file it operates
--noauto-pt, -nDon't automatically create a default partition table on empty device
--output, -o <list>Desc
--getsz, -sPrint the size in 512-byte sectors of each given block device. This option is DEPRECATED in favour of blockdev(8)
--type, -t <type>Enable support only for disklabels of the specified type, and disable support for all other types
--units, -u [unit]When listing partition tables, show sizes in 'sectors' or in 'cylinders'
--cylinders, -C <number>Specify the number of cylinders of the disk
--heads, -H <number>Specify the number of heads of the disk. (Not the physical number, of course, but the number used for partition tables.)
--sectors, -SSpecify the number of sectors per track of the disk. (Not the physical number, of course, but the number used for partition tables.)
--wipe, -w <when>Wipe filesystem, RAID and partition-table signatures from the device, in order to avoid possible collisions
--wipe-partitions, -W <when>Wipe filesystem, RAID and partition-table signatures from a newly created partitions, in order to avoid possible collisions