These are Linux commands to deal with services running for different apps on operating system. By the use of systemctl and chkconfig command, we can start and stop the services as well as configure them for auto start/stop in unix.
Basically above commands or tools allows you to configure automatic service start stop in the /etc/init.d scripts available on operating systems. Until RHEL 6.x, "chkconfig " command was available and later RHEL 7, the command "systemctl" introduced for auto service start/stop. although all legacy commands may support in new versions of RHEL and CentOS.
List All Services
By Chkconfig command, list all the services on
Above snippet shows different run level by numbering and post fixes.By Systemctl, all active services and all enabled/disabled services
Check Specific Service Status
Stop Specific Service on Run Levels
Below command will stop httpd service at run level 2,3,4,5.
Start/Stop Specific Service by systemctl
Check Status of a Service by systemctl
How to Auto Start a Service at Boot of Operating System
By chkconfig command, below will stop httpd service at run level 4,5.
_________________________________________________________________________________
No comments:
Post a Comment