Take the 2-minute tour ×

I am running CentOS and want to execute a command when the system is booted. Reading other posts on ServerFault the recommend file to use is rc.local. However, rc.local exists in both /etc/ and /etc/rc.d/. Which file should I use, and what is the difference between the two?


share|improve this question
/etc/rc.local is a symlink to /etc/rc.d/rc.local –  Laurentiu Roescu Mar 22 '13 at 13:43

1 Answer 1

I am retarded, /etc/rc.local is a symlink to /etc/rc.d/rc.local.

share|improve this answer
Just put everything before the "exit 0" and your are good to go :) . Try to use full path of the comands like "/sbin/iptables" for example to avoid problems. –  nwildner Mar 22 '13 at 14:27

Your Answer


