mirror of
https://github.com/cheat/cheat.git
synced 2024-11-16 00:48:29 +01:00
commit
e17fa47655
1 changed files with 36 additions and 0 deletions
36
cheatsheets/systemctl
Normal file
36
cheatsheets/systemctl
Normal file
|
@ -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
|
Loading…
Reference in a new issue