If you're a second late on the draw for shutdown -c, and already root on the console, a very fast # init 5 will cancel a shutdown after init changes runlevel.
NOTE: This answer is mostly obsolete now. init 5 isn't very useful on systemd, which, sadly, most systems now use.
发布评论
评论(4)
关闭-c
是在最近的关机
中“取消关机”。该语法还支持用于公告目的的
shutdown -c
,因此如果其他人使用该机器,这会很方便。shutdown -c
is "cancel shutdown" on reasonably recentshutdown
s.The syntax also supports
shutdown -c <message>
for announcement purposes, so that's handy if other people use the machine.您可以使用
ps
找到关闭进程并中止它,例如使用ps|grep shutdown
。替代且不那么引人注目的版本:
You can use
ps
to find the shutdown process and abort it, for example withps|grep shutdown
.Alternate and less eyeball-intensive versions of this:
如果您在
shutdown -c
的绘制上晚了一秒,并且已经在控制台上 root,则非常快的# init 5
将在 init 更改运行级别后取消关闭。注意:这个答案现在基本上已经过时了。
init 5
在 systemd 上并不是很有用,遗憾的是,大多数系统现在都在使用 systemd。If you're a second late on the draw for
shutdown -c
, and already root on the console, a very fast# init 5
will cancel a shutdown after init changes runlevel.NOTE: This answer is mostly obsolete now.
init 5
isn't very useful on systemd, which, sadly, most systems now use.来自 BSD 系统上
shutdown
的手册页:From
shutdown
's man page on BSD systems: