How to check remaining space in Linux

In the Linux machine, knowing our system’s storage is very important for optimal performance. Knowing how much space is left on your hard drive can save you from unexpected interruptions and ensure a smooth computing experience. In this guide, we’ll explore various methods to check the remaining space in Linux.

  1. df Command:
    The df command is a powerful tool that displays information about disk space usage on your Linux system. Open a terminal and type the following command:
df -h

This will provide a human-readable output, showing disk space usage in a more understandable format.

  1. du Command:
    The du command is used to estimate file space usage. To check the space used by a specific directory, use the following command:
du -sh /path/to/directory

Replace “/path/to/directory” with the actual path of the directory you want to check.

  1. Using the File Manager:
    If you prefer a graphical interface, most Linux distributions come with a file manager that allows you to check disk space. Open your file manager and navigate to the root directory. Right-click on the drive and select “Properties” to view the available and used space.
  2. Checking Home Directory Usage:
    To check the space used in your home directory, you can use the du command with the following syntax:
du -sh ~

This will display the space used by all files and directories in your home folder.

  1. Monitoring Tools:
    Linux provides various tools for real-time monitoring of system resources. One such tool is htop. Install it using your package manager and run:
htop

In the htop interface, you can view CPU, memory, and disk usage in real-time.

Conclusion:
Regularly checking your remaining disk space in Linux is essential for maintaining a healthy system. Whether you prefer the command line or a graphical approach, the methods outlined above will help you stay informed about your system’s storage status. Keep an eye on your disk space, and you’ll be better prepared to manage your Linux system efficiently.

Similar tutorials.