I know that to enable a service to start automatically on system startup you just change the file mode into executable, for e.g.

cd /etc/rc.d
chmod 755 rc.httpd

My question is how is it related to the system runlevels? How to tell the specific service should run say on runlevel #4?

I'm running Slackware 14.2

2 Answers 2


it is on other rcs.

Below, you can see rc.M that starts httpd on system init (it is written on the head of rc.M). When you unlock the rights on rc.httpd, it enables rc.M that runs on system startup to run it. Other rcs stops it when a halt, or a reboot is called.

You can see it with a grep. I did it on a Slackware (great choice).

$ grep http rc.*
rc.0:if [ -x /etc/rc.d/rc.httpd ]; then
rc.0:  /etc/rc.d/rc.httpd stop
rc.6:if [ -x /etc/rc.d/rc.httpd ]; then
rc.6:  /etc/rc.d/rc.httpd stop
rc.K:if [ -x /etc/rc.d/rc.httpd ]; then
rc.K:  /etc/rc.d/rc.httpd stop
rc.M:if [ -x /etc/rc.d/rc.httpd ]; then
rc.M:  . /etc/rc.d/rc.httpd start

Typically, services are kicked off from /etc/rc.d/rc.M, but if you really want to set up specific run-levels, you could put it in /etc/rc.d/rc.4 itself.

This is defined in /etc/inittab. You might have to edit that to get extra creative.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .