Regarding the output of "df -h" in Linux
Solution 1
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
Solution 2
/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.
Related videos on Youtube
user2720323
Updated on September 18, 2022Comments
-
user2720323 over 1 year
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 [root@]#
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?
-
Thomas Nyman over 10 years
-
user2720323 over 10 yearsThanks .. But what is tempfs and what is the speciality of tempfs ? and what the correstponding /dev/shm ?
-
user2720323 over 10 yearsCan we rename the names as userdefined ... /dev/sda3 as /dev/asdf_home
-
Sepahrad Salour over 10 yearsUr welcome, Please read my edited post, For your second question you can do everything in linux but you may need to change kernel..
-
user over 10 years"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.