Step By Step Guide to Run df Commands on Ubuntu 20.04 LTS

We can easily check the information of  disk space using command line tool called df command.‘df‘ command stands for “disk filesystem“. It is used to get a full information of available and used disk space usage of the file system in linux system.

Some commands of df (Disk File system) are given below:

Step 1: Update the System.

apt-get update

Step 2: Disk Filesystem (df) Syntax & Examples:

df [options] [devices]

  • To print the information of file system device names, disk blocks, total disk space used, available disk space, percentage of usage and mount points on a file system.

df

  • Here is the command output.

  • To list the file system disk space in Human Readable Format.

df -h

  • Here is the command output.

  • To list the Information of all File System Disk Space Usage.

df -a

  • Here is the command output.

  • To show the File System details in Bytes.

df -k

  • Here is the command output.

  • To show the File System details in megabytes(MB).

df -m

  • Here is the command output.

  • To show the File System details in gigabytes(GB).

df -h

  • Here is the command output.

  • To show the information of /home file system information.

df -h /home

  • Here is the command output.

  • To show File System Type.

df -T

  • Here is the command output.

  • To show the File System Inodes.

df -i

  • Here is the command output.

  • To Include or Exclude only Certain File System Type.

df -t ext4
or
df -x ext4

  • Here is the command output.

  • To list all available options in df.

df --help

  • Here is the command output.

Leave a Reply