Adding services to auto start after reboot in linux

In this blog, you will come to know the process of Adding services to auto start after reboot in Linux.

The chkconfig utility is a command-line tool that allows you to specify in which runlevel to start a selected service, as well as to list all available services along with their current setting. Note that with the exception of listing, you must have superuser privileges to use this cAdding services to auto start after reboot in linuxommand.

chkconfig – Updates and queries runlevel information for system services.


       chkconfig [–list] [–type type][name]
       chkconfig –add name
       chkconfig –del name
       chkconfig –override name
       chkconfig [–level levels] [–type type] name <on|off|reset|resetpriorities>
       chkconfig [–level levels] [–type type] name
To display the current settings for a selected service only, use chkconfig –list followed by the name of the service: 
The chkconfig command can also be used to activate and deactivate services. The chkconfig –list command displays a list of system services and whether they are started (on) or stopped (off) in runlevels 0-6. At the end of the list is a section for the services managed by xinetd.

To list all startup services in alphabetic order.
Check the mysqld,zabbix-agent and httpd service is auto-started in below mention runlevel: 

Adding mysqld, zabbix-agent, httpd to chkconfig.
To Disable any run-level use the off parameter.

To remove service from the startup list, use the –del option as shown below.
Script Files under rc.d Subdirectories:
  • Whenever you add or remove a service from chkconfig control, it does the following under the /etc/rc.d sub-directories.
  • When chkconfig –add command is executed, it creates a symbolic link file to start and stop the service under corresponding rc directory.
  • When chkconfig –del command is executed, it removes the symbolic link file from the corresponding rc directory.

Related Articles

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Adblock Detected

Please consider supporting us by disabling your ad blocker
%d bloggers like this: