Red Hat Enterprise Linux Server release 7.0 (Maipo) 修改启动级别
之前的配置文件在/etc/inittab 这里
vim /etc/inittab 我们服务器用,习惯把id:5改成3,字符界面启动,或者最小化安装。
rhel7.0 做了很多大的改变,打开inittab看下
# inittab is no longer used when using systemd. /etc/inittab 这个文件已经不再使用
# inittab is no longer used when using systemd.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# Ctrl-Alt-Delete is handled by /etc/systemd/system/ctrl-alt-del.target
#
# systemd uses 'targets' instead of runlevels. By default, there are two main targets:
#
# multi-user.target: analogous to runlevel 3 类似于运行级别3
# graphical.target: analogous to runlevel 5 类似于运行级别5
#
# To set a default target, run: #运行下面 命令设置默认开机启动级别
#
# ln -sf /lib/systemd/system/.target /etc/systemd/system/default.target
/lib/systemd/system/ 里面有0-6 六个级别的文件软连接
runlevel0.target poweroff
runlevel1.target rescue
runlevel2.target multi-user
runlevel3.target multi-user
runlevel4.target multi-user
runlevel5.target graphical
runlevel6.target reboot
例如:修改5级别: ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
例如:修改3级别: ln -sf /lib/systemd/system/runlevel3.target /etc/systemd/system/default.target
阅读(2551) | 评论(0) | 转发(0) |