init命令用于切换到指定的运行级别,用法如下:
[root@localhost ~]# init 0 //关机
[root@localhost ~]# init 1 //切换到单用户模式/救援模式
[root@localhost ~]# init 2 //切换到无网络连接的多用户命令行模式
[root@localhost ~]# init 3 //切换到有网络连接的多用户命令行模式
[root@localhost ~]# init 4 //不可用
[root@localhost ~]# init 5 //切换到带图形界面的多用户模式
[root@localhost ~]# init 6 //重启
-
使用命令systemctl set-default multi-user.target 切换到文本模式
-
如果切换图形界面,使用命令systemctl set-default graphical.target 如图所示
https://www.cnblogs.com/nodot/articles/1954135.html
https://www.cnblogs.com/zuikeol/p/6797423.html
http://8u.hn.cn/linux/Linuxchangyongmingling/11385.html
https://blog.csdn.net/wd2011063437/article/details/78959365
https://jingyan.baidu.com/article/e6c8503c447f8ce54f1a18fe.html