aboutsummaryrefslogtreecommitdiff
path: root/cheat/.cheat/systemd
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-03-31 23:13:43 +0200
committerneodarz <neodarz@neodarz.net>2019-03-31 23:13:59 +0200
commitdf7a1f481e26f9c495db76809f7e9b7f7b6e30d3 (patch)
tree08968f70b4b6eeca0997c8f95e709067d6bea106 /cheat/.cheat/systemd
parentd94c1d0d81cfa007a6ef3ad81f4c4f08e74dd781 (diff)
downloaddotfiles_ascii-df7a1f481e26f9c495db76809f7e9b7f7b6e30d3.tar.xz
dotfiles_ascii-df7a1f481e26f9c495db76809f7e9b7f7b6e30d3.zip
Add more cheat
Diffstat (limited to 'cheat/.cheat/systemd')
-rw-r--r--cheat/.cheat/systemd28
1 files changed, 28 insertions, 0 deletions
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 <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>`