mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-14 22:48:37 +00:00
Update cheatsheets
This commit is contained in:
@@ -19,3 +19,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Show the contents of a unit file for a template:
|
||||
|
||||
`systemctl cat {{template@}}`
|
||||
|
||||
- Show the contents of a user unit file:
|
||||
|
||||
`systemctl cat --user {{unit}}`
|
||||
|
||||
@@ -15,3 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Stop a service from running on boot and stop its current execution:
|
||||
|
||||
`systemctl disable {{unit}} --now`
|
||||
|
||||
- Stop a user service from running on login:
|
||||
|
||||
`systemctl disable --user {{unit}}`
|
||||
|
||||
@@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Edit systemd unit files.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#edit%20UNIT%E2%80%A6>.
|
||||
|
||||
- Replace a unit file non-destructively:
|
||||
- Overlay a unit file non-destructively:
|
||||
|
||||
`sudo systemctl edit {{unit_file}}`
|
||||
|
||||
@@ -19,3 +19,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Create a new unit file:
|
||||
|
||||
`sudo systemctl edit {{[-lf|--full --force]}} {{unit_file}}`
|
||||
|
||||
- Overlay a user unit file:
|
||||
|
||||
`systemctl edit --user {{unit_file}}`
|
||||
|
||||
@@ -15,3 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Enable a service to run on boot and start it now:
|
||||
|
||||
`systemctl enable {{unit}} --now`
|
||||
|
||||
- Enable a user unit to run on login:
|
||||
|
||||
`systemctl enable --user {{unit}}`
|
||||
|
||||
@@ -15,3 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Ensure that the service is shut down while masking:
|
||||
|
||||
`systemctl mask {{service_name}} --now`
|
||||
|
||||
- Mask a user service:
|
||||
|
||||
`sysemctl mask --user {{service_name}}`
|
||||
|
||||
@@ -16,3 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Restart more than one unit:
|
||||
|
||||
`systemctl restart {{unit1 unit2 ...}}`
|
||||
|
||||
- Restart a user unit:
|
||||
|
||||
`systemctl restart --user {{unit}}`
|
||||
|
||||
@@ -11,3 +11,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Start a unit:
|
||||
|
||||
`systemctl start {{unit}}`
|
||||
|
||||
- Start a user unit:
|
||||
|
||||
`systemctl start --user {{unit}}`
|
||||
|
||||
@@ -31,3 +31,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- List all units with a specific state:
|
||||
|
||||
`systemctl status --state {{active|inactive|failed}}`
|
||||
|
||||
- Show the status of a user unit:
|
||||
|
||||
`systemctl status --user {{unit}}`
|
||||
|
||||
@@ -15,3 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Stop a service and suppress warnings:
|
||||
|
||||
`systemctl stop --no-warn {{unit}}`
|
||||
|
||||
- Stop a user unit:
|
||||
|
||||
`systemctl stop --user {{unit}}`
|
||||
|
||||
Reference in New Issue
Block a user