Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In the book I am reading, the output of df command is shown like this:

Filesystem 1K-blocks     Used Available Use% Mounted on
/dev/sda2   15115452  5012392   9949716  34% /
/dev/sda5   59631908 26545424  30008432  47% /home
/dev/sda1     147764    17370    122765  13% /boot
tmpfs         256856        0    256856   0% /dev/shm

But when I run the same command (whilst passing the -h parameter) on my Ubuntu server (VirtualBox VM), the output is like this:

Filesystem          Size  Used Avail Use% Mounted on
/dev/mapper/a-root  4.2G  1.1G  3.0G  26% /
udev                741M  4.0K  741M   1% /dev
tmpfs               300M  268K  300M   1% /run
none                5.0M     0  5.0M   0% /run/lock
none                750M     0  750M   0% /run/shm
/dev/sda1           228M   27M  190M  13% /boot

What I want to know is, why is /home directory missing? And what exactly is the criteria that the listed directories fulfill? (I mean, / is listed, but not /home. But /run is there, and also /run/lock and /run/shm. Why the bias?)

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

df shows you the utilization and free space on filesystems. Obviously, on your machine, /home is not a filesystem but a mere directory.

share|improve this answer
    
So, in simple terms, /home isn't listed because it isn't on a different partition or device; and in my case, it's in the / (root) file system itself, right? –  its_me Apr 12 '13 at 17:51
1  
yes, very much so... But if you are using LVM (logical volume manager) every filesystem doesn't have to reside on a different partition. One partition can be made looking like multiple partitions. Hence the name, Logical. –  Mel_Burslan Apr 12 '13 at 17:55
add comment

Furthermore, you can type mount to check currently mounted filesystems. Whatever filesystems df displays, they should be on that list, too. If you want to check how much of the disk space does your /home directory use, you can do du -sh /home (if that's what you originally intended).

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.