Menu Close
14.2. 기본 대상 보기
기본 대상 단위는 /etc/systemd/system/default.target
파일로 표시됩니다.
절차
기본적으로 사용되는 대상 단위를 확인하려면 다음을 수행합니다.
$ systemctl get-default graphical.target
심볼릭 링크를 사용하여 기본 대상을 결정하려면 다음을 수행합니다.
$ ls -l /usr/lib/systemd/system/default.target
= 대상 유닛 보기
기본적으로 systemctl list-units
명령은 활성 유닛만 표시합니다.
절차
상태에 관계없이 로드된 모든 단위를 나열하려면 다음을 수행합니다.
$ systemctl list-units --type target --all
현재 로드된 모든 대상 유닛을 나열하려면 다음을 수행합니다.
$ systemctl list-units --type target UNIT LOAD ACTIVE SUB DESCRIPTION basic.target loaded active active Basic System cryptsetup.target loaded active active Encrypted Volumes getty.target loaded active active Login Prompts graphical.target loaded active active Graphical Interface local-fs-pre.target loaded active active Local File Systems (Pre) local-fs.target loaded active active Local File Systems multi-user.target loaded active active Multi-User System network.target loaded active active Network paths.target loaded active active Paths remote-fs.target loaded active active Remote File Systems sockets.target loaded active active Sockets sound.target loaded active active Sound Card spice-vdagentd.target loaded active active Agent daemon for Spice guests swap.target loaded active active Swap sysinit.target loaded active active System Initialization time-sync.target loaded active active System Time Synchronized timers.target loaded active active Timers 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. 17 loaded units listed.
14.2.1. 기본 대상 변경
기본 대상 단위는 /etc/systemd/system/default.target
파일로 표시됩니다. 다음 절차에서는 systemctl 명령을 사용하여 기본 대상을 변경하는 방법을 설명합니다.
절차
기본 대상 단위를 결정하려면 다음을 수행합니다.
# systemctl get-default
기본적으로 다른 대상 장치를 사용하도록 시스템을 구성하려면 다음을 수행합니다.
# systemctl set-default multi-user.target rm /etc/systemd/system/default.target ln -s /usr/lib/systemd/system/multi-user.target /etc/systemd/system/default.target
이 명령은
/etc/systemd/system/default.target
파일을/usr/lib/systemd/system/name.target
에 대한 심볼릭 링크로 교체합니다. 여기서 name은 사용하려는 대상 장치의 이름입니다. multi-user 를 기본적으로 사용하려는 대상 유닛의 이름으로 바꿉니다.표 14.3.
set-default
명령의 일반적인 대상Basic
기본 부팅을 다루는 단위 대상
rescue
기본 시스템에서 가져오고 복구 쉘을 생성하는 단위 대상
multi-user
다중 사용자 시스템을 설정하기 위한 단위 대상
graphical
그래픽 로그인 화면을 설정하는 단위 대상
emergency
기본 콘솔에서 긴급 쉘을 시작하는 단위 대상
sysinit
시스템 초기화에 필요한 서비스를 가져오는 단위 대상
재부팅
# reboot
추가 리소스
-
대상 단위에 대한 자세한 내용은
systemd.special
manpage를 참조하십시오. -
부팅
도움말 페이지