运行级别如下:
centos6———————centos7
runlevel0.target -> poweroff.target
runlevel1.target -> rescue.target
runlevel2.target -> multi-user.target
runlevel3.target -> multi-user.target
runlevel4.target -> multi-user.target
runlevel5.target -> graphical.target
runlevel6.target -> reboot.target
linux运行级别:
centos6(init或systemv)
0 关机halt
1 单用户模式(用于维护,无需用户名、密码登录)
2 多用户模式(不启用网络功能)
3 多用户模式(带网络功能),命令行界面(CLI:command line interface)
4 未定义
5 图形界面(桌面环境)
6 重启reboot
[root@localhost ~]# systemctl get-default
multi-user.target
[root@localhost ~]#
设置运行级别命令的格式为:systemctl command unit.target
systemctl get-default 获得当前的运行级别
systemctl set-default multi-user.target 设置默认运行级别为mulit-user
systemctl isolate multi-user.target 在不重启的情况下,切换到mulit-user下
systemctl isolate graphical.target 在不重启的情况下,切换到graphical下