변군이글루

[리눅스] CentOS 7 런레벨(runlevel) 변경 본문

서___리눅스

[리눅스] CentOS 7 런레벨(runlevel) 변경

변군 변군이글루 2017.04.18 16:20

Change default runlevel in CentOS 7/RHEL 7

 

1. RunLevel config 파일
(CentOS 7 부터 systemctl 명령을 통해 RunLevel를 변경하도록 안내)
# vi /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
#
-----

 

2. 현재 시스템 RunLevel 확인
# systemctl get-default
---Output---
graphical.target
---

 

3. Runlevel 3로 변경(Change default to runlevel 3)
# systemctl set-default multi-user.target
---Output---
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target.
---

 

4. 현재 시스템 RunLevel 확인
# systemctl get-default
---Output---
multi-user.target
---

 

5. 현재 세션에서 런레벨 변경하기
# systemctl isolate multi-user.target

 

0 Comments
댓글쓰기 폼