共 1 篇文章

标签:Linux系统如何查看重启记录 (linux查看谁重启记录)

Linux系统如何查看重启记录 (linux查看谁重启记录)

作为一种开源的操作系统,Linux 在服务器和个人电脑上均有广泛应用。由于其稳定性和安全性,Linux 系统需要经常重启,以确保系统的稳定性和数据的安全。在 Linux 系统中,查看重启记录是重要的一项操作,其能帮助我们对系统的运行情况有个全面的了解。本篇文章将会介绍如何查看 Linux 系统的重启记录。 1. 使用 last 命令查看重启记录 在 Linux 系统中,last 命令可以帮助我们查看 Linux 系统的历史登录和重启记录。此命令可以查看当前系统的用户登录和注销信息、进程启动和结束信息以及重启记录等。 命令格式:last -x reboot 命令参数: -x 显示系统关机和重新启动的原因 reboot 关键词指定要查看的事件类型 执行该命令,系统将输出该系统的重启历史记录。如下所示: root@ubuntu:~# last -x reboot reboot system boot 5.11.0-38-gener Thu Nov 11 12:00 still running reboot system boot 5.11.0-38-gener Thu Nov 11 11:57 still running reboot system boot 5.11.0-38-gener Wed Nov 3 15:44 – 12:00 (20+20:16) reboot system boot 5.11.0-38-gener Fri Oct 29 15:35 – 15:54 (4+00:18) reboot system boot 5.11.0-38-gener Fri Oct 29 15:30 – 15:35 (00:04) reboot system boot 5.11.0-38-gener Fri Oct 29 15:21 – 15:30 (00:08) shutdown system down 5.11.0-38-gener Fri Oct 29 15:20 – 15:21 (00:00) reboot system boot 5.11.0-38-gener Thu Oct 28 13:00 – 15:21 (02:21) shutdown system down 5.11.0-38-gener...

技术分享