Linux Partition Naming Convention ( IDE Drive Mappings )

Q. I am new to Linux and I not able to understand /dev/hdc (is it C: drive?) under Linux. This is quite confusing for a new Linux user like me. What device naming convention followed by Linux? Can you explain it in layman’s term?

A. Linux does not follows DOS or Windows XP style partition names or drive names. It is true that it is a bit confusing for a new Linux user. Linux use combination of bus and . For example if you are using IDE hard disk or CDROM it is will use HD word. If you are using SCSI interface it will use SD word.

A typical home pc or laptop has 2 or 4 IDE channels as follows:

  • ide0 = primary
  • ide1 = secondary
  • ide2 = tertiary
  • ide3 = quaternary

For example:

  • ide0 = primary master = hda
  • ide1 = primary slave = hdb
  • ide2 = secondary master = hdc
  • ide3 = secondary slave = hdd

and so on…

SCSI devices are listed as devices sda, sdb, sdc, sdd, sde, sdf, and sdg in the /dev directory. Similarly, partitions on these disks can range from 1 to 16 and are also in the /dev directory.

Now each hard drive has 4 primary partitions (limit of PC x86 architecture). First partition is denoted by number 1. For example:

  • First partition : /dev/hda1
  • Second partition : /dev/hda2
  • Third partition : /dev/hda3
  • Fourth partition : /dev/hda4

You can run command fdisk -l to display list of partitions:

WARNING! These examples may result into data loss. Use fdisk command with caution as it manipulate your partition table.

# fdisk -l

Disk /dev/hda: 20.0 GB, 20060651520 bytes
255 heads, 63 sectors/track, 2438 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1275    10241406   83  W95 FAT32
/dev/hda2            1276        1530     2048287+  82  Linux swap / Solaris

Disk /dev/hdb: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1        2432    19535008+  83  Linux
/dev/hdb2            2433        2554      979965   82  Linux swap / Solaris
/dev/hdb3            2555        6202    29302560   83  Linux
/dev/hdb4            6203        9733    28362757+   5  Extended
/dev/hdb5            6203        9733    28362726   83  Linux

In above output /dev/hda1 is FAT32 partition with Windows XP installed (windows XP/Vista C: ).

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 9 comments so far... add one ↓

CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall β€’ CentOS 8 β€’ OpenSUSE β€’ RHEL 8 β€’ Ubuntu 16.04 β€’ Ubuntu 18.04 β€’ Ubuntu 20.04
Network Utilitiesdig β€’ host β€’ ip β€’ nmap
OpenVPNCentOS 7 β€’ CentOS 8 β€’ Debian 10 β€’ Debian 8/9 β€’ Ubuntu 18.04 β€’ Ubuntu 20.04
Package Managerapk β€’ apt
Processes Managementbg β€’ chroot β€’ cron β€’ disown β€’ fg β€’ jobs β€’ killall β€’ kill β€’ pidof β€’ pstree β€’ pwdx β€’ time
Searchinggrep β€’ whereis β€’ which
User Informationgroups β€’ id β€’ lastcomm β€’ last β€’ lid/libuser-lid β€’ logname β€’ members β€’ users β€’ whoami β€’ who β€’ w
WireGuard VPNAlpine β€’ CentOS 8 β€’ Debian 10 β€’ Firewall β€’ Ubuntu 20.04
9 comments… add one
  • Anonymous May 4, 2006 @ 16:53

    It is true that PC/X86 impose a limit of 4 primary partitions per hard drive, but one of those partitions can be designated as an extended partition. Inside of this extended partition, logical partitions can be specified. So you can have partition number as follows:

    a) 1-4 primary partitions
    b) 5-16 logical partitions

    For example /dev/hda5.

  • Anonymous Jul 20, 2006 @ 11:16

    Having looked at the answer to the question, I think that output β€œfdisk -l” suggests that windows OS is at ide0, and linux is ide1.

    Some time ago I was trying to do the same configuration( windows OS-primary master, linux – primary slave). The installation was ok. During the boot up, I was getting error some think like ” MBR error β€œ.
    Then I had to create a boot disk in order to get my windows to work.
    Is your boot loader on MBR or on hda1?

    My ide0 has 4 partions-
    partition 1(NTFS)- windows os
    partition 2 & 3(NTFS)- windows data
    partition 4 – Unallocated.

    Any suggestion how could I get the same configuration to work?

  • 🐧 nixcraft Jul 23, 2006 @ 21:02

    You can install mbr on /dev/hda (IDE0) and use grub to boot both oses or use Windows 2000/XP to boot Linux. Both operations require modification of MBR, hence backup is suggested. If you need specific procedure let me knowÒ€¦ or just post your question to our

  • Anonymous Aug 2, 2006 @ 19:01

    DISK ==> Your device
    /dev/hda ==> Primary Master IDE
    /dev/hdb ==> Primary Slave IDE
    /dev/hdc ==> Secondary Master IDE
    /dev/hdd ==> Secondary Slave IDE
    /dev/sda ==> SCSI Disk 0
    /dev/sdb ==> SCSI Disk 1
    /dev/sdc ==> SCSI Disk 2
    /dev/sdd ==> SCSI Disk 3

    in order to address the actual data that is being held on your data, you need to address it by partitions.

    For example if you had 2 parition on /dev/hda.

    First parition => /dev/hda1
    Second parition => /dev/hda2

    Hope this helps someone :)

  • ghanshyam Gupta Mar 6, 2009 @ 13:16

    For example:

    ide0 = primary master = hda
    ide1 = primary slave = hab
    ide2 = secondary master = hdc
    ide3 = secondary slave = hdd
    Hi ,
    ide1 = primary slave = hab should be
    ghanshyam gupta

  • ghanshyam Gupta Mar 6, 2009 @ 13:18

    ide1 = primary slave = hab
    should be ide1 = primary slave = hdb

  • sangeetha Jun 18, 2009 @ 11:42

    hi,can any one suggeess me, how to run an application in linux

    • VARMA Apr 18, 2011 @ 9:51

      Shortcut Key for RUN command = Alt+f2

  • Brian Esserlieu Sep 14, 2011 @ 15:14

    Works on openSUSE 11, make sure to change the ownership of the new partition from root (sudo chown ).

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @