Created
December 13, 2019 04:37
-
-
Save 2arunpmohan/1ed131819c3e1203b8c979a5c022ba03 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**1. start a service** | |
`sudo systemctl start nginx.service` | |
**2. Stop a service** | |
`sudo systemctl stop nginx.service` | |
**3.Restart a service** | |
`sudo systemctl restart nginx.service` | |
**4.Reload a service** | |
without interrupting the normal functionality | |
`sudo systemctl reload nginx.service` | |
**5. Enable a service at bootup** | |
`sudo systemctl enable nginx.service` | |
**6. Disable a service at bootup** | |
`sudo systemctl disable nginx.service` | |
**7. To get all of the unit files that systemd has listed as “active”** | |
`systemctl list-units` | |
**8. To list all of the units that systemd has loaded or attempted to load into memory, including those that are not currently active** | |
`systemctl list-units --all` | |
**9. To list all of the units installed on the system, including those that systemd has not tried to load into memory** | |
`systemctl list-unit-files` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment