Linux Check Disk Space Command To View System Disk Usage

To check the disk space usage on a Linux system, you can use the df command.

The basic syntax is as follows:

df -h

The -h option makes the output human-readable, showing sizes in a format like 1G instead of 10241024.

The output of the df command shows information about the disk space usage of all mounted file systems, including the file system type, the total size, the amount of used space, the amount of free space, and the mount point.

You can also use the du command to check the disk usage of a specific directory and its subdirectories. The basic syntax is as follows:

du -sh /path/to/directory

The -s option shows the total disk usage of the specified directory and its subdirectories, and the -h option makes the output human-readable.

You can use these commands to monitor disk space usage on your system and identify any directories or files that are consuming large amounts of disk space.

(Adipex)

Leave a Comment