Linux - The fdisk utility

January 2017


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

Related


Published by jak58. Latest update on December 6, 2013 at 06:10 AM by jak58.
This document, titled "Linux - The fdisk utility," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).