Linux - The fdisk utility

Ask a question

Linux - The fdisk utility




The fdisk utility is available on Windows (MS-DOS) and Linux. It allows you to create partitions on your hard drive, but it should be noted that the Linux version is more complex than its MS-DOS counterpart.

How you use the fdisk tool?

  • Use the fdisk command to launch the tool.
  • When no argument is specified fdisk will make use the first partition it finds. To make use of a specific partition, simply pass the name of the latter as an argument. In this example, the second partition is used:
    • fdisk /dev/hdb

How hard drives are named under Linux?

  • For IDE drives, the partitions are named as hda, hdb,..
  • For SCSI disks, the partitions are named as sda, sdb,..

Fdisk commands



CommandDescription
ddelete partition
llist of partition types
mPrint the current menu
ncreate a new partition
pview partitions
qexit fdisk without saving settings
tchange the partition type
vcheck the partition table
wsave changes and exit fdisk



Original document published on CommentcaMarche.net
Jean-François Pillou

CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jeff Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.

Learn more about the CCM team

Related