diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-08-07 23:36:06 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-08-22 23:37:33 +0200 |
commit | 56c8d51b3b00d8f8919f0b464d8c4c04e8197368 (patch) | |
tree | 274c976e1d479cb1bbc9882349d21dd90a84c1d9 /src | |
parent | 1a5f22eb8e3bca005804f1cd36856a0114144795 (diff) | |
download | notes-56c8d51b3b00d8f8919f0b464d8c4c04e8197368.tar.gz notes-56c8d51b3b00d8f8919f0b464d8c4c04e8197368.zip |
systemd: add state/type query examples
Diffstat (limited to 'src')
-rw-r--r-- | src/linux/systemd.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/linux/systemd.md b/src/linux/systemd.md index 14ced0b..18f87e5 100644 --- a/src/linux/systemd.md +++ b/src/linux/systemd.md @@ -7,6 +7,9 @@ Inspect units: systemctl [opts] [cmd] [opts] --user + --type=TYPE List only given types eg, service, timer, socket (use --type=help for a list) + --state=STATE List only given states eg running, enabled (use --state=help for a list) + --failed List only failed services [cmd] list-units <pattern> List units in memory @@ -25,6 +28,15 @@ systemctl [opts] [cmd] show <unit> Show properties of unit ``` +### Example: List failed units +```bash +# List all system failed units. +systemctl --failed + +# List all user failed units. +systemctl --user --failed +``` + ### Example: Trivial user unit ```bash |