有几种方法可以从命令行重新启动Debian系统。本指南概述了最常见和有效的方法。
Method 1: The reboot
Command
The simplest method is using the reboot
command.这需要根特权:
Sudo重新启动
您将提示您的密码。
Method 2: The systemctl
Command
The systemctl
command, a powerful systemd tool, also offers a reboot function:
sudo systemctl重新启动
此命令还需要root访问。
Method 3: The /sbin/reboot
Command
对于立即,不间断的重新启动,请使用此命令:
/sbin/重新启动
此命令无延迟执行重新启动。
Method 4: The shutdown
Command
The shutdown
command, primarily used for system shutdown, can initiate a reboot using the -r
flag.立即重新启动:
sudo关闭-r现在
例如,安排重新启动,例如五分钟:
sudo关闭-R 5
Method 5: The init
Command
The init
command manages run levels.运行6级启动重新启动:
sudo init 6
紧急重新启动:魔术sysrq键
Magic Sysrq键提供了一种重新启动冷冻系统的最后度假方法。这是一个内核级操作,仅应在紧急情况下绕过正常的关闭过程。谨慎使用,因为数据丢失是可能的。该过程涉及两个命令:
Echo 1>/proc/sys/kernel/sysrq Echo B> /proc /sysrq-trigger
结论
Debian提供了多个重新启动的命令行选项。选择最适合您需求和舒适度的方法。 Remember to use sudo
where necessary to execute commands with root privileges.
以上是重新开始Debian的艺术的详细内容。更多信息请关注PHP中文网其他相关文章!