This is our ongoing Linux command series where we are going to review how we can use chkconfig command efficiently with it’s available parameters. The Chkconfig command tool allows to configure services start and stop automatically in the /etc/rd.d/init.d scripts through command line. Let’s see some examples.
1. List All Services
Using ‘–list‘ parameter will displayed all services and their current start-up status in each run-level configuration.
2. Check Status of Specific Service
Below command shows startup configuration for a particular service. It’s showing HTTP services are turned off in all run levels.
3. How Do I Start a Particular Service on Run Levels
The following ‘chkconfig‘ command shows how we can start HTTP services only on run level 3 and 5 with ‘–level‘ parameter. First command starts httpd services on run level 3 and 5 and second command verifies the status of httpd services running on run level.
4. How to Check Which Services are On/Off
The following command will display all the services which are On and Off in specific run level 5.
5. How Do I Stop a Particular Service on Run Levels
The following command will turned Off a service called postfix for a just single run level. Similarly, we can turn Off a particular service in multiple run levels in one go as shown under.
As we all know, there are seven run levels are available on Linux Operating System. We’ll cover the significant of different run levels and booting sequence in details in our upcoming article. So, please stay tuned.
No comments:
Post a Comment