« Back to File systems: Frequently Asked Questions

How to see used and free disk space

Use the df command to see disk space usage. By default, the output will show 1K-blocks. To see sizes in a human-readable format, use the --human-readable option.

Show all file systems and their disk usage

By specifying the --all option, we see all mounted file systems, even though they don’t have disk usage information.

# df --all --human-readable
Filesystem                         Size  Used Avail Use% Mounted on
sysfs                                 0     0     0    - /sys
proc                                  0     0     0    - /proc
udev                               1.9G     0  1.9G   0% /dev
devpts                                0     0     0    - /dev/pts
tmpfs                              392M  1.1M  391M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   14G  6.9G  6.4G  53% /
securityfs                            0     0     0    - /sys/kernel/security
tmpfs                              2.0G   12K  2.0G   1% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
cgroup2                               0     0     0    - /sys/fs/cgroup
pstore                                0     0     0    - /sys/fs/pstore
bpf                                   0     0     0    - /sys/fs/bpf
systemd-1                             -     -     -    - /proc/sys/fs/binfmt_misc
hugetlbfs                             0     0     0    - /dev/hugepages
mqueue                                0     0     0    - /dev/mqueue
debugfs                               0     0     0    - /sys/kernel/debug
tracefs                               0     0     0    - /sys/kernel/tracing
configfs                              0     0     0    - /sys/kernel/config
none                                  0     0     0    - /run/credentials/systemd-sysusers.service
fusectl                               0     0     0    - /sys/fs/fuse/connections
systemd-1                             -     -     -    - /mnt/projects
/dev/loop2                          39M   39M     0 100% /snap/snapd/21465
/dev/loop0                          88M   88M     0 100% /snap/lxd/28373
/dev/loop4                          88M   88M     0 100% /snap/lxd/27948
/dev/loop5                          64M   64M     0 100% /snap/core20/2264
/dev/sda2                          1.7G  253M  1.4G  16% /boot
binfmt_misc                           0     0     0    - /proc/sys/fs/binfmt_misc
sunrpc                                0     0     0    - /run/rpc_pipefs
tmpfs                              392M  1.1M  391M   1% /run/snapd/ns
nsfs                                  0     0     0    - /run/snapd/ns/lxd.mnt
tmpfs                              392M  4.0K  392M   1% /run/user/1000
/dev/loop6                          64M   64M     0 100% /snap/core20/2318
/dev/loop3                          39M   39M     0 100% /snap/snapd/21759
192.168.1.10:/Projects              10G  2.8G  7.3G  28% /mnt/projects

To shorten this command, combine the options and use df -ah.

Other questions related to Linux file systems

Feedback

Is the described answer not working or incorrect, got another tip or question? Share your thoughts!