From bbbcfe98f9796c6ee25465a093cec5e243d91c3d Mon Sep 17 00:00:00 2001 From: Amit Saha Date: Mon, 28 Oct 2013 10:25:34 +1000 Subject: [PATCH] systemctl cheat --- cheatsheets/systemctl | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 cheatsheets/systemctl diff --git a/cheatsheets/systemctl b/cheatsheets/systemctl new file mode 100644 index 0000000..932540c --- /dev/null +++ b/cheatsheets/systemctl @@ -0,0 +1,36 @@ +# List all loaded/active units +systemctl list-units + +# Check the status of a service +systemctl status foo.service + +# Start a service +systemctl start foo.service + +# Restart a service +systemctl restart foo.service + +# Stop a service +systemctl stop foo.service + +# Reload a service's configuration +systemctl reload foo.service + +# Enable a service to startup on boot +systemctl enable foo.service + +# Disable a service to startup on boot +systemctl disable foo.service + +# List the dependencies of a service +# when no service name is specified, lists the dependencies of default.target +systemctl list-dependencies foo.service + +# List currently loaded targets +systemctl list-units --type=target + +# Change current target +systemctl isolate foo.target + +# Change default target +systemctl enable foo.target