How to auto start service after reboot in Red Hat Linux?

You can run the below command to auto start the service after reboot

# chkconfig service_name on

But the above command will enable the service only for the current run level so I always prefer using the below command

# chkconfig --level 35 service_name on

Using the level argument you can select the runlevel on which you want your service to be running

To view all the currently enabled services after reboot

The below command will show all the services enabled for run level 3 and 5

# chkconfig --list | awk '{print $1"tt", $5 , $7}' | grep on
acpid            3:on 5:on
anacron          3:on 5:on
atd              3:on 5:on
auditd           3:on 5:on
cimlistenerd     3:on 5:on
cimserverd       3:on 5:on
cpuspeed         3:on 5:on
crond            3:on 5:on
dcerpcd          3:on 5:on
eventlogd        3:on 5:on
haldaemon        3:on 5:on

 

Related Articles
How to get a list of open ports in Linux?
What are the s and k scripts in the etc rcx.d directories
How to check all the currently running services in Linux

 

1 thought on “How to auto start service after reboot in Red Hat Linux?”

Leave a Comment