CentOS – How to Automatically Issue a Command After Rebooting

bootcentoslinux

I need to automatically issue a command on my CentOS 4.8 server after it reboots and/or powers up. Can someone please tell me where I can place this? Is there a configuration file somewhere for this?

Thanks,

-M

Best Answer

Just put in your crontab:

@reboot /usr/bin/whatever

This has the advantage that it can be done by non-superusers, which rc.local needs.