[Linux] CentOS run level º¯°æ
http://ehostidc.co.kr/center/EH050402.php?no=177716&page=6&choose=tit¡¦ (302)https://blog.naver.com/goethe1/221607503878 (325)
CentOS 6 이하 버전과 CentOS 7 버전의 run level 변경 방법
A. CentOS 6 이하 버전
/etc/inittab 의 ID 만 변경
B. CentOS 7
1. /etc/inittab 내용
[root@logserver ~]# cat /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 /usr/lib/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
# graphical.target: analogous to runlevel 5
#
# To view current default target, run:
# systemctl get-default
#
# To set a default target, run:
# systemctl set-default TARGET.target
1. 현재 run level 확인
[root@logserver ~]# systemctl get-default
multi-user.target
2. run level 변경
run level 5로 변경
[root@logserver ~]# systemctl set-default graphical.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target.
run level 3 으로 변경
[root@logserver ~]# systemctl set-default multi-user.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target.
3. 즉시 run level 변경
[root@logserver ~]# systemctl isolate multi-user.target