一般我只用 init 3和 init 5
init 3 #进入命令行
init 5 #进入桌面
systemctl set-default multi-user.target #默认进入命令行
systemctl set-default graphical.target #默认进入桌面
以下是帮助
[root@wjy ~]# init --help
init [OPTIONS...] {COMMAND}
Send control commands to the init daemon.
--help Show this help
--no-wall Don't send wall message before halt/power-off/reboot
Commands:
0 Power-off the machine #关机
6 Reboot the machine #重启
2, 3, 4, 5 Start runlevelX.target unit
1, s, S Enter rescue mode
q, Q Reload init daemon configuration
u, U Reexecute init daemon