![如何从命令行安全地重启加密的 Linux 磁盘?](https://linux22.com/image/886007/%E5%A6%82%E4%BD%95%E4%BB%8E%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%AE%89%E5%85%A8%E5%9C%B0%E9%87%8D%E5%90%AF%E5%8A%A0%E5%AF%86%E7%9A%84%20Linux%20%E7%A3%81%E7%9B%98%EF%BC%9F.png)
我从痛苦中吸取了教训
sudo reboot
在错误的时间发生这种情况是导致硬盘损坏的好方法。
重启运行加密 LUKS 的 Ubuntu 的唯一安全方法是手动“killall”您知道的进程吗?对于这种情况,是否有 ''' sudo safe-reboot''' 命令?
答案1
是的,有/sbin/shutdown
。阅读man shutdown
,你可以使用它来重新启动或暂停。请参阅man shutdown
,其中部分内容如下:
trusty (8) shutdown.8.gz
Provided by: upstart_1.12.1-0ubuntu4_i386 bug
NAME
shutdown - bring the system down
SYNOPSIS
shutdown [OPTION]... TIME [MESSAGE]
DESCRIPTION
shutdown arranges for the system to be brought down in a safe way. All
logged-in users are notified that the system is going down and, within
the last five minutes of TIME, new logins are prevented.