How to check the reason for a system restart in Linux?

You can use the following command on a Linux system to view the reasons for a system reboot:

  1. system message logs
sudo dmesg | grep -i shutdown
  1. final
last -x reboot
  1. view system logs
sudo journalctl -b | grep -i shutdown
  1. – the period of time during which a system or machine is in operation
uptime -s

These commands can assist you in obtaining the reasons for and related information about system reboots.

bannerAds