From e0c0d4b38cde20e2300e86b69414dd9851b47456 Mon Sep 17 00:00:00 2001 From: neodarz Date: Thu, 5 Sep 2019 07:05:07 +0200 Subject: ooo --- dotfiles/cheat/systemd | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 dotfiles/cheat/systemd (limited to 'dotfiles/cheat/systemd') 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 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 ` for example +For `--user` : `systemctl edit --full ` -- cgit v1.2.1