To check the free disk space on a Linux or Unix system, you can use the df
command. The df
command is a utility that displays information about the available and used disk space on a file system.
To check the free disk space on your system, open a terminal and enter the following command:
refer to:uttualri.comdf -h
The -h
option tells the df
command to display the sizes of the file systems in "human-readable" format, which means that the sizes are displayed in a more convenient format, such as in megabytes (MB) or gigabytes (GB).
The output of the df
command will show the name of each file system, the total size of the file system, the amount of space that is used, and the amount of space that is available. For example, the output might look something like this:
Filesystem Size Used Avail Use% Mounted on /dev/sda1 9.8G 2.6G 6.8G 28% / /dev/sdb1 1.8T 1.2T 647G 65% /mnt/backup
To check the free disk space on a specific file system, you can specify the file system as an argument to the df
command. For example, to check the free disk space on the /
file system, you can use the following command:
df -h /
This will display information about the /
file system, including the total size, used space, and available space.
Keep in mind that the df
command only shows information about mounted file systems. If you want to check the free space on a file system that is not mounted, you will need to mount it first before running the df
command.