systemctl 命令完全指南(七)

2016-12-17 18:43:43 1999

控制系统运行等级

 

32. 启动系统救援模式

# systemctl rescue

Broadcast message from root@tecmint on pts/0(Wed2015-04-2911:31:18 IST):

The system is going down to rescue mode NOW!

 

33. 进入紧急模式


# systemctl emergency

Welcome to emergency mode!After logging in, type "journalctl -xb" to view

system logs,"systemctl reboot" to reboot,"systemctl default" to try again

to boot intodefault mode.

 

34. 列出当前使用的运行等级


# systemctl get-default

multi-user.target

 

35. 启动运行等级5,即图形模式


# systemctl isolate runlevel5.target

# systemctl isolate graphical.target


36. 启动运行等级3,即多用户模式(命令行)


# systemctl isolate runlevel3.target

# systemctl isolate multiuser.target

 

36. 设置多用户模式或图形模式为默认运行等级


# systemctl set-default runlevel3.target

# systemctl set-default runlevel5.target

 

37. 重启、停止、挂起、休眠系统或使系统进入混合睡眠


# systemctl reboot

# systemctl halt

# systemctl suspend

# systemctl hibernate

# systemctl hybrid-sleep


对于不知运行等级为何物的人,说明如下。

  • Runlevel 0 : 关闭系统

  • Runlevel 1 : 救援?维护模式

  • Runlevel 3 : 多用户,无图形系统

  • Runlevel 4 : 多用户,无图形系统

  • Runlevel 5 : 多用户,图形化系统

  • Runlevel 6 : 关闭并重启机器


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: