How do I check disk space on Linux?

How do I check disk space on Linux?

The simplest way to find the free disk space on Linux is to use df command. The df command stands for disk-free and quite obviously, it shows you the free and available disk space on Linux systems. With -h option, it shows the disk space in human-readable format (MB and GB).

Which command is used for checking disk space usage in Linux?

df Command
Check Linux Disk Space Using df Command. The df command stands for disk free, and it shows you the amount of space taken up by different drives. By default, df displays values in 1-kilobyte blocks.

How do I check disk space on Terminal?

To find out the available and used disk space, use df (disk filesystems, sometimes called disk free). To discover what’s taking up the used disk space, use du (disk usage). Type df and press enter in a Bash terminal window to get started.

How do I check disk usage in Unix?

Check disk space on Unix operating system Unix command to check disk space: df command – Shows the amount of disk space used and available on Unix file systems. du command – Display disk usage statistic for each directory on Unix server.

How do I free up disk space on Linux?

Freeing disk space on your Linux server

  1. Get to the root of your machine by running cd /
  2. Run sudo du -h –max-depth=1.
  3. Note which directories are using a lot of disk space.
  4. cd into one of the big directories.
  5. Run ls -l to see which files are using a lot of space. Delete any you don’t need.
  6. Repeat steps 2 to 5.

Where are the 10 largest files in Linux?

Command To Find Top 10 Largest Files In Linux

  1. du command -h option : display file sizes in human readable format, in Kilobytes, Megabytes and Gigabytes.
  2. du command -s option : Show total for each argument.
  3. du command -x option : Skip directories.
  4. sort command -r option : Reverse the result of comparisons.

Which command displays the amount of free disk space?

df command
Use the df command to show the amount of free disk space on each mounted disk.