Centos 7 managing services with Systemd

Centos 7 managing services with Systemd.
-List all the current loaded targets as command below:
$ sudo systemctl list-units -t target
Each services has 3 states; enabled, disabled and static.
- To list enabled services as command below:
$ sudo systemctl list-unit-files --type=service | grep enabled
- To start/stop/restart services as command below:
# systemctl status <servicename>
# systemctl stop <servicename>
# systemctl start <servicename>
# systemctl restart <servicename>
- To check running ntp services as comman below:
$ sudo systemctl list-units --type service --all | grep ntp
- Set the service to start a boot:
# systemctl enable <servicename>
- Disable service start-up boot
# systemctl disable service
The update later related command line "Centos 7 managing services with Systemd" in this article.

Comments

Post a Comment

Popular posts from this blog

zimbra some services are not running [Solve problem]

Bash script list all IP addresses connected to Server

How to install php7 on centos 6