diff options
author | neodarz <neodarz@neodarz.net> | 2019-09-05 07:05:07 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2019-09-05 07:05:07 +0200 |
commit | e0c0d4b38cde20e2300e86b69414dd9851b47456 (patch) | |
tree | 5df65243447352a9637d1f783247bfd5ccff2ef4 /dotfiles/cheat/systemd | |
parent | dc45bf89a66ec6c8cd25cf5605deb853f6984705 (diff) | |
download | dotfiles_dotdrop-e0c0d4b38cde20e2300e86b69414dd9851b47456.tar.xz dotfiles_dotdrop-e0c0d4b38cde20e2300e86b69414dd9851b47456.zip |
ooo
Diffstat (limited to '')
-rw-r--r-- | dotfiles/cheat/systemd | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/dotfiles/cheat/systemd b/dotfiles/cheat/systemd new file mode 100644 index 0000000..4389bb6 --- /dev/null +++ b/dotfiles/cheat/systemd @@ -0,0 +1,28 @@ +# Display process startup time +systemd-analyze + +# Display process startup time at service level +systemd-analyze blame + +# List running units +systemctl list-units + +# Load a unit at startup +systemctl enable foo.service + +# Start or Stop a unit +systemctl <start | stop> foo.service + +# Unit file locations +/etc/systemd/system +/usr/lib/systemd/system + +# Manage service with battery status +ConditionACPower= + +True is AC connecter and false if on battery. + +# Modify unit file without altering upstring unit file +# Source: https://serverfault.com/questions/840996/modify-systemd-unit-file-without-altering-upstream-unit-file +Use commande `systemctl edit --full <unit>` for example +For `--user` : `systemctl edit --full <unit>` |