问题原文
原帖链接 · iamauser · CC BY-SA 3.0
- Command
systemctl get-defaultreturnsuser-defined.target. - Then I use
systemctl isolate multi-user.targetto switch tomulti-user.target. - I can see that a bunch of services that shouldn't be running on
user-defined.taretand should be running onmulti-userare running, this implies I am onmulti-user.target. - But,
systemctl get-defaultalways returnsuser-defined.target.
Question is, without looking and sorting through the services, how do I know that I am running on multi-user.target after using isolate ?
社区高分解答
原帖链接 · Amir · CC BY-SA 4.0
In systemd, there may be more than one active target at a time.
To inspect the list of all currently active targets:
systemctl list-units --type target --state active
To quickly find out whether a specific target (e.g. user-defined.target) is active or not:
systemctl is-active user-defined.target
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
