Regarding the output of "df -h" in Linux.

[root@]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             193G   82G  101G  45% /
tmpfs                 1.9G  272K  1.9G   1% /dev/shm
/dev/sda1             486M   28M  433M   7% /boot
/dev/sda3              49G  759M   45G   2% /home

Here I am unable to understand what is /dev/sda1 /dev/sda2 /dev/sda3 tmpfs and correspoding Column (mounted on) /boot / /home /dev/shm .\

Can anyone please explain these terms?


Every device in linux has device node under /dev/ (The default).

Pattern is: Hard Disk type,Hard Disk Number,Partition Number

  • sd means SATA hard disk
  • hd means IDE hard disk
  • a means First hard disk , b Second and so on.
  • 1 First partition, 2 Second and so on.

For example:

sda1 means First SATA hard disk and partition.

sdb1 means Second SATA hard disk and First partition

hda2 means First IDE hard disk and Second partition

/boot or / or /home are directories... When linux boots up it mount partitions under /dev/ to specified directories. From your df -h output /dev/sda1 mounted on /boot directory.. But why mount?! Because if you want to use hard disk you need to mount partition to a directory for access and use it.

tmpfs: Tmpfs is a file system which keeps all files in virtual memory. For more details read following links: http://www.cyberciti.biz/tips/what-is-devshm-and-its-practical-usage.html https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt

  • 1
    Actually, since kernel version 2.6.20 both SATA and PATA devices, including devices on a IDE bus receive a sd prefix. – Thomas Nyman Sep 30 '13 at 6:51
  • Thanks .. But what is tempfs and what is the speciality of tempfs ? and what the correstponding /dev/shm ? – user2720323 Sep 30 '13 at 7:36
  • Can we rename the names as userdefined ... /dev/sda3 as /dev/asdf_home – user2720323 Sep 30 '13 at 9:10
  • Ur welcome, Please read my edited post, For your second question you can do everything in linux but you may need to change kernel.. – Sepahrad Salour Sep 30 '13 at 9:29
  • 1
    "Every device in linux has directory under /dev/." Not true either as stated or to the exclusion of other possibilities. First off, those are device nodes, not directories (though device nodes are exposed as directory entries, which is something else). Second, device nodes can exist anywhere, and while /dev is the customary place it's really just a directory like any other. – user Sep 30 '13 at 11:39

/dev/sda1, /dev/sda2 and /dev/sda3 are the first, second and third partition respectively of the first PATA or SATA device, which are mounted at certain points in the file system hierarchy.

The / indicates the root of the file system hierachy. The /boot directory contains files needed during the boot process and /home typically contains the files owned by regular users.

tmpfs is a special file system which stores files in physical memory instead of on disk. As they are stored in volatile memory, they will disappear when the system is rebooted unless copied to disk storage. The particular tmpfs instance you see is mounted at dev/shm which is a shared memory implementation for passing data between processes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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