From df7a1f481e26f9c495db76809f7e9b7f7b6e30d3 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sun, 31 Mar 2019 23:13:43 +0200 Subject: Add more cheat --- cheat/.cheat/systemd | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 cheat/.cheat/systemd (limited to 'cheat/.cheat/systemd') diff --git a/cheat/.cheat/systemd b/cheat/.cheat/systemd new file mode 100644 index 0000000..4389bb6 --- /dev/null +++ b/cheat/.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