System and Hardware commands in Linux

Below is the list of commands to get information about system and hardware.

  1. free – used to display memory information
  2. cat /proc/meminfo – memory information
  3. fdisk – hard drive partition information
  4. du – prints information about the disk usage
  5. df – information about free disk space in given directory
  6. lscpu – details about cpu
  7. cat /proc/cpuinfo – cpu information
  8. uname -a – Prints details of the operating system
  9. last reboot – prints the time when system was last time rebooted
  10. init 0/ shutdown -h – shutdown the system
  11. reboot/init 6/ shutdown -r now – command to restart the system

uptime command

uptime command is used to display current time, the duration of time for which system is running, how many users are currently logged into the system. It also displays the average load on the system.

shutdown command
shutdown command is used to shut down the system. Here -h means halt.

$ shutdown -h now

If you want to shut down the system after 5 minutes, you can use below command.
# shutdown -h +5

If you want to reboot the system, you can use below command. Here -r means reboot.
# shutdown -r now

You may also like...