DeveloperBreeze

How to view free space on a Linux server

df -h

Explanation:

  • df: This command stands for "disk free" and reports the amount of disk space used and available on Linux filesystems.
  • -h: This option stands for "human-readable" format, which makes the output easier to read by showing sizes in KB, MB, GB, etc.

Sample Output:

When you run the df -h command, you might see output similar to the following:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        40G   25G   15G  63% /
udev            1.9G     0  1.9G   0% /dev
tmpfs           384M  1.2M  383M   1% /run
/dev/sda2       100G   50G   50G  50% /home

Additional Tips:

  • Specific Filesystem: To view the space for a specific filesystem, add its path at the end of the command, like so:
  df -h /home
  • Inodes: To check free inodes instead of disk space, use the -i option:
  df -i

Related Posts

More content you might like

Tutorial
bash

How to Reset the MySQL Root Password Using DROP USER

mysql -u root -p

You will be prompted to enter the password. Enter the new password you set in Step 5.

Oct 03, 2024
Read More
Tutorial

Getting Started with FFmpeg

  • To speed up the video (e.g., 2x faster):
  ffmpeg -i input.mp4 -vf "setpts=0.5*PTS" output.mp4

Aug 21, 2024
Read More
Tutorial

How to Install an AppImage on Linux

The first step is to download the AppImage file for the application you want to run. AppImages are typically available on the official website of the application or through repositories like AppImageHub.

For example, you might download an AppImage called exampleName.AppImage.

Aug 21, 2024
Read More
Tutorial
bash

Finding the Top 10 Biggest Files on an Ubuntu Server

If you're interested in both files and directories, you can use the du command:

sudo du -ah /path/to/directory | sort -rh | head -n 10

Aug 11, 2024
Read More

Discussion 0

Please sign in to join the discussion.

No comments yet. Be the first to share your thoughts!