생성하려는 서비스에 대해 가능한 모든 systemd 대상을 나열하려면 어떻게 해야 합니까?
답변1
당신은 그것을 사용할 수 있습니다
systemctl list-units --type target
그러면 다음과 같은 결과가 반환됩니다.
UNIT LOAD ACTIVE SUB DESCRIPTION >
basic.target loaded active active Basic System >
blockdev@dev-mapper-nvme0n1p3_crypt.target loaded active active Block Device Prepar>
bluetooth.target loaded active active Bluetooth >
cryptsetup.target loaded active active Local Encrypted Vol>
getty.target loaded active active Login Prompts >
graphical.target loaded active active Graphical Interface>
local-fs-pre.target loaded active active Local File Systems >
local-fs.target loaded active active Local File Systems >
multi-user.target loaded active active Multi-User System >
network-online.target loaded active active Network is Online >
network.target loaded active active Network >
nfs-client.target loaded active active NFS client services>
paths.target loaded active active Paths >
remote-fs-pre.target loaded active active Remote File Systems>
remote-fs.target loaded active active Remote File Systems>
rpcbind.target loaded active active RPC Port Mapper >
slices.target loaded active active Slices >
sockets.target loaded active active Sockets >
sound.target loaded active active Sound Card >
swap.target loaded active active Swap >
sysinit.target loaded active active System Initializati>
time-set.target loaded active active System Time Set >
time-sync.target loaded active active System Time Synchro>
timers.target loaded active active Timers >
답변2
당신은 그것을 사용할 수 있습니다 :
systemctl list-unit-files --type target --all
list-unit-files
: 유닛 파일 나열--type target
: 대상 유닛만 표시--all
: 상태에 관계없이 모든 유닛 파일을 나열합니다.
또한 사용자 목표를 나열하십시오.
systemctl list-unit-files --type target --all --user