Skip to content

Commit

Permalink
update systemctl cli guide
Browse files Browse the repository at this point in the history
  • Loading branch information
vanvuvuong authored and truongnx committed May 7, 2024
1 parent 2186b36 commit ece6c05
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pages/linux/systemctl.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# systemctl

> Control the systemd system and service manager.
> Control the systemd system and service manager. You may need to run with `sudo` prefix to avoid permission denied issues.
> More information: <https://www.freedesktop.org/software/systemd/man/systemctl.html>.
- Show all running services:
Expand All @@ -11,13 +11,9 @@

`systemctl --failed`

- Start/Stop/Restart/Reload a service:
- Start/Stop/Restart/Reload/Show the status a service:

`systemctl {{start|stop|restart|reload}} {{unit}}`

- Show the status of a unit:

`systemctl status {{unit}}`
`systemctl {{start|stop|restart|reload|status}} {{unit}}`

- Enable/Disable a unit to be started on bootup:

Expand All @@ -31,6 +27,10 @@

`systemctl daemon-reload`

- Check if a unit is enabled:
- Check if a unit is active/enabled/failed:

`systemctl {{is-active|is-enabled|is-failed|}} {{unit}}`

- List all units of service/socket/automount filter by running/failed state:

`systemctl is-enabled {{unit}}`
`systemctl list-units --type={{service|socket|automount}} --state={{failed|running}}`

0 comments on commit ece6c05

Please sign in to comment.