Run Level 변경

1. 현재 설정된 runlevel 확인

[root@localhost ~]# runlevel 
N 3

2. inittab 에서 직접 runlevel 변경하기

[root@localhost ~]# vim /etc/init
# inittab is only used by upstart for the default runlevel.
# System initialization is started by /etc/init/rcS.conf
# Individual runlevels are started by /etc/init/rc.conf
# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf
# Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf,
# with configuration in /etc/sysconfig/init.
# For information on how to write upstart event handlers, or how
# upstart works, see init(5), init(8), and initctl(8).
# Default runlevel. The runlevels used are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)

3. System reboot

[root@localhost ~]# reboot

1. RHEL7 에서 사용할 수 있는 target 정보 출력

[root@localhost etc]# systemctl list-units --type=target --all
UNIT                   LOAD   ACTIVE   SUB    DESCRIPTION           loaded active   active Basic System      loaded active   active Encrypted Volumes       loaded inactive dead   Emergency Mode           loaded inactive dead   Final Step           loaded active   active Login Prompts       loaded active   active Graphical Interface    loaded active   active Local File Systems (Pre)        loaded active   active Local File Systems      loaded active   active Multi-User System  loaded inactive dead   Network is Online         loaded active   active Network             loaded active   active Network File System Server      loaded inactive dead   Host and Network Name Lookups loaded inactive dead   User and Group Name Lookups           loaded active   active Paths   loaded inactive dead   Remote File Systems (Pre)       loaded active   active Remote File Systems          loaded inactive dead   Rescue Mode        loaded inactive dead   Shutdown          loaded active   active Slices         loaded active   active Sockets            loaded active   active Swap         loaded active   active System Initialization          not-found inactive dead       loaded inactive dead   System Time Synchronized          loaded active   active Timers          loaded inactive dead   Unmount All Filesystems
LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
27 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.

2. 현재 설정된 runlevel 확인

[root@localhost ~]# runlevel 
N 3

3. runlevel 변경

[root@localhost ~]# systemctl set-default
rm '/etc/systemd/system/'
ln -s '/usr/lib/systemd/system/' '/etc/systemd/system/'

4. runlevel 확인

[root@localhost ~]# runlevel 
N 5
로그인하면 댓글을 남길 수 있습니다.
  • run_level_변경.txt
  • 마지막으로 수정됨: 2015/06/19 00:49
  • (바깥 편집)