You can check the disk space usage on a Linux system using various commands and tools. Here are some common ways to do so:

  1. df Command:
    The df (disk free) command displays information about disk space usage for all mounted filesystems. By default, it shows the information in kilobytes.
   df -h

The -h option makes the output more human-readable by displaying sizes in gigabytes, megabytes, etc.

  1. du Command:
    The du (disk usage) command is used to estimate the file and directory space usage. You can use it to check the space occupied by specific directories or files.
   du -sh /path/to/directory

The -s option shows only the total size, and the -h option makes the output human-readable.

  1. ncdu Command:
    If you want a more interactive way to check disk usage, you can use the ncdu (NCurses Disk Usage) command. It provides a text-based interface to navigate and analyze disk usage.
   ncdu /path/to/directory
  1. Graphical Disk Usage Analyzers:
    Many Linux distributions provide graphical tools to visualize disk usage. Examples include “Baobab” (for GNOME desktop) and “Filelight” (for KDE desktop). You can install and use these tools to get a visual representation of disk usage.
  2. File Managers:
    File managers like Nautilus (GNOME) and Dolphin (KDE) often show disk space usage for directories in their interface. You can right-click on a folder and check properties to see the space it occupies.
  3. Monitoring Tools:
    If you need continuous monitoring of disk space usage, you can use tools like htop, iotop, or monitoring systems like Prometheus with appropriate exporters.

Remember that to view disk space usage, you might need sufficient permissions to access the filesystems and directories you’re checking. Also, it’s a good practice to periodically check disk space usage to ensure that your system doesn’t run out of space, which could lead to various issues.