Sobes.tech
Junior — Middle

How can you find out the current load and the state of the file system in the Linux operating system?

sobes.tech AI

Answer from AI

In Linux, the following commands can be used to monitor current load and filesystem status:

  • top or htop — show current CPU load, memory, processes.
  • uptime — displays system uptime and average load.
  • vmstat — statistics on memory, processes, input/output.
  • iostat — statistics on disk operations.
  • df -h — displays filesystem usage (free and used space).
  • du — shows the size of directories and files.
  • mount — list of mounted filesystems.
  • lsblk — information about block devices (disks).

Example:

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        50G   20G   28G  42% /

For more detailed monitoring, specialized tools like glances or nmon can be used.