Is there a RHEL 7 systemctl --show-default option?
Issue
- Is it possible to get a --show-default option added to systemctl to show what the default.target is set to rather than typing in:
systemctl list-units --type=target
- Which actually doesn't even highlight the
default.target. It would also be better than typing in:
]$ ls -l /lib/systemd/system/default.target
lrwxrwxrwx. 1 root root 16 Apr 16 11:24 /lib/systemd/system/default.target -> graphical.target
Example usage of --show-default (i.e. default.target is set to multi-user.target):
# systemctl --show-default
multi-user.target
- That syntax requires a couple of levels of processing down the line. What this request is for is a simple command to show the default target without too much thinking being involved. To that end, something like:
systemctl show --default
or
systemctl show --default-target (if that's more acceptable)
- add --show-default option to systemd
Environment
- Red Hat Enterprise Linux 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
