Home >Computer Tutorials >Computer Knowledge >How to check restart records in centos

How to check restart records in centos

WBOY
WBOYforward
2024-02-28 17:01:20972browse

How to check restart records in centos

To view the restart records in CentOS, you can use the following command:

  1. Use the last command to view system startup and shutdown records:
last reboot
  1. Use the journalctl command to view system logs and filter out restart-related logs:
journalctl _COMM=systemd _CMDLINE=--system
  1. Use the dmesg command to view the kernel log when the system starts, and you can view the information when the system restarts:
dmesg | grep 'systemd'

You can view the restart records of the CentOS system through the above command.

Ask AI for details

The above is the detailed content of How to check restart records in centos. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:mryunwei.com. If there is any infringement, please contact admin@php.cn delete