DEV Community

Saravanan
Saravanan

Posted on

GNU/Linux utilities for system info

df

Disk free or df is used to find the free space under each partition.

$df -h
Enter fullscreen mode Exit fullscreen mode

Above command displays the free space in a human-readable format. We can also check if we can create new files with the below command.

$df -ih
Enter fullscreen mode Exit fullscreen mode

It displays inodes in each partition. If there is none then, new files cannot be created.

free

Free is similar to disk free. It is used the check the free and used amount of RAM/memory.

$free -h
Enter fullscreen mode Exit fullscreen mode

The above command displays the usage of memory in a human-readable format.

lspci

lspci lists all PCI devices in the system.

$lspci
Enter fullscreen mode Exit fullscreen mode

Above command lists all PCI devices. The first column has data in the format of domain : bus : slot . func followed by the device description.

$lspci -t
Enter fullscreen mode Exit fullscreen mode

Above command displays in ASCII tree format to show how devices are connected to buses.

#lspci -vvvs $ID
Enter fullscreen mode Exit fullscreen mode

To display complete information about the device -vvv is used. A decrease in character v count reduces the detail of information. -s is used to specify a device by its id without which it displays all device information.

$lspci -k
Enter fullscreen mode Exit fullscreen mode

To get the kernel module for each device using the -k flag.

uname

uname is used to print the system information. The -a flag is to display all the information.

$uname -a
Enter fullscreen mode Exit fullscreen mode

Particular information can be printed with the flags. They are

  • o: operating system name, not the distro name
  • i: the hardware platform
  • p: processor architecture
  • v: kernel version
  • s: kernel name
  • m: machine hardware name
  • n: system's name/node network hostname

Top comments (0)