Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In Windows; you have the C:\ drive. This is the primary drive upon which Windows is installed.

However, Linux uses a different naming scheme: sda, sdb[1-4], etc. Can anyone give me a brief outline of it so I might actually understand it instead of being confused by it?

share|improve this question
    
It's worth noting that in normal use you don't need to use the /dev/sd* names. The equivalent of your C: drive is / (aka the root directory). You can see all drives by going to 'Computer' in the file manager. –  Thomas K Aug 18 '11 at 9:47
    
Also note, MS Windows has been trying to discard the notion of drive letters for 8 (?) years now. For Linux (and Ubuntu), I for one do not miss them. –  david6 Nov 21 '11 at 21:49
add comment

4 Answers

up vote 23 down vote accepted

In general, the letters (fd, sd, hd) refer to the device type ('SATA, SCSI/SATA, IDE'), the third letter is for the device order (a the first, b the second, etc) and the numbers refer to the partitions the device has, starting by zero.

  • hd refers to an IDE-type drive
  • sd refers to a SCSI drive in general, but is mostly popular for SATA drives and CD/DVD
  • fd is floppy disk

So for example:

  • the first (1) partition on your first (a) SATA drive is /dev/sda1
  • The third (3) partition on your second (b) SATA drive is /dev/sdb3
  • the second partition (2) of the second (b) IDE hard disk is '/dev/hdb2'

This device naming is more of a background one, as the actual point to access it a directory mount point.

I think that the following three articles will help you a bit:

https://help.ubuntu.com/11.04/installation-guide/i386/device-names.html

http://tldp.org/HOWTO/html_single/Partition/

https://help.ubuntu.com/11.04/installation-guide/amd64/linuxdevices.html

share|improve this answer
4  
additionally, most modern distros allow referencing drives by uuid (a unique identifier for drives and other storage devices) if the kernel supports it there will be symlinks in /dev/disk/by-uuid/ that point to the "standard" /dev/sd** device nodes. This gives the benefit of having a stable reference to a drive even if you shuffle drives around on the system. –  crasic Aug 15 '11 at 21:07
add comment

Just for clarity, on the Windows side you're confusing the file system naming with the drive naming. Windows hides the drive naming from you almost completely, but you can see examples in the registry and if you edit your boot.ini file. A disk reference there might look like this:

multi(0)disk(0)rdisk(0)partition(1)

You can also see individual disks in the disk manager tool. The reason I bring this up is that the ntfs file system allows you to play all kinds of games. You can mount a separate disk to a folder in your C: and another drive at the same time, and unmounted disks may not have a drive letter at all. So don't confuse the file system from disk naming.

Linux is similar, here. sda1 is a common partition name, but it could be mounted anywhere on the file system.

share|improve this answer
    
but............ –  crasic Aug 16 '11 at 5:02
    
@crasic - weird, seems like it ate the last part of my post –  Joel Coehoorn Aug 16 '11 at 16:49
add comment

Pavlos G. is mostly correct, however /dev/hd** is no longer in use by IDE harddisks (and CD drives), they have been using /dev/sd** since kernel 2.6.19 (and ubuntu since 7.10, ~2007)

share|improve this answer
add comment

You really shouldn't rely on the sd* naming scheme. It can change dramatically depending on drive spin up, hot plugging, and additional storage adapters. Best thing to use to uniquely address your device is the persistent links like /dev/disk/by-id/. Linux doesn't have the "boot from first disk" limitations and can also mount drives by label so drive ordering is really irrelevant.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.