본문 바로가기
OS-OE Knowledge/Linux-Unix KB

[RHEL] Target 관리 (과거 runlevel의 대체 모드)

by 스쳐가는인연 2022. 8. 25.

[RHEL] Target 관리 (과거 runlevel의 대체 모드)

1. Default Target 정보 확인
# systemctl get-default
multi-user.target

2. 설정 가능한 정보 확인
# systemctl list-units --type target

Note. 모든 정보 확인
# systemctl list-units --type target --all

3. 원하는 모드로 Target 설정 (적용을 위해 리부팅 필요)
# systemctl set-default multi-user.target

or 

# ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

Note. 즉시 적용 (현재 Target 변경)
# systemctl isolate multi-user.target

# systemctl isolate graphical.target

Runlevel Target Units Description
0 runlevel0.target, poweroff.target Shut down and power off the system.
- 시스템 중단(Halt)
1 runlevel1.target, rescue.target Set up a rescue shell.
- Single user mode
2 runlevel2.target, multi-user.target Set up a non-graphical multi-user system.
3 runlevel3.target, multi-user.target Set up a non-graphical multi-user system.
- CLI mode
4 runlevel4.target, multi-user.target Set up a non-graphical multi-user system.
5 runlevel5.target, graphical.target Set up a graphical multi-user system.
- GUI mode (X windows)
6 runlevel6.target, reboot.target Shut down and reboot the system.
- Reboot


참고자료:
CHAPTER 15. WORKING WITH SYSTEMD TARGETS
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/working-with-systemd-targets_configuring-basic-system-settings

Systemd Target 사용
https://hippogrammer.tistory.com/75

linux systemd(systemctl) 로 run level(target) 관리하기
https://www.lesstif.com/system-admin/linux-systemd-systemctl-run-level-target-98926803.html?selectedPageVersions=1&selectedPageVersions=2

 

 

 

 

반응형