Linux - The fdisk utility

October 2016

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

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

Related :

This document entitled « Linux - The fdisk utility » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.