DF doesn't show swap partition

2.8k Views Asked by At

I am using DF to check my disk usage and partition. Why doesn't it show my swap partition? I have 8GB for swap when I installed CentOS 7.

root@localhost abigail]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root  196G   30G  166G  16% /
devtmpfs                 3.8G     0  3.8G   0% /dev
tmpfs                    3.9G  130M  3.7G   4% /dev/shm
tmpfs                    3.9G  8.9M  3.8G   1% /run
tmpfs                    3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sda1                2.0G  129M  1.9G   7% /boot
/dev/mapper/centos-home  261G   54G  207G  21% /home
1

There are 1 best solutions below

2
On BEST ANSWER

Swap isn't a filesystem (like e.g. ext3) and thus isn't mounted in the normal sense. Use "swapon -s", it will confirm the numbers from the "free" output.