This commit is contained in:
2019-06-14 17:22:29 +02:00
parent 5c46f09737
commit f6448395e5
7 changed files with 962 additions and 627 deletions

38
docs/Mint/systemctl.md Normal file
View File

@@ -0,0 +1,38 @@
# systemctl
```bash
To list systemd services we will use systemctl command as below
# systemctl list-unit-files
To list active systemd services run
# systemctl | more
# systemctl list-units --type service
You can pipe the output to grep to search a more specific service as shown below
# systemctl | grep "apache2"
To check the services alongside the ports they are listening.
# netstat -pnltu
For example, to check if OpenSSH is running on your system, run
# systemctl status sshd
Alternatively, you can use the syntax below to check if the service is active
# systemctl is-active sshd
o check if OpenSSH is enabled, run
# systemctl is-enabled sshd
Ancien system:
check the status of OpenSSH, run
# service sshd status
You can also check all services by running
# chkconfig --list
```