Adding A Command Startup Script To Run At Bootup
- Forums
- Linux Hosting
- Adding A Command Startup Script To Run At Bootup
lets say you want a script to start at startup of linux. doing this took me a while to find out so i will tell you how about adding a script in your linux system it will start automatically when the kernel is loading or at startup when you linux server is [1418], Last Updated: Mon Jun 24, 2024
Webune Support
Fri Aug 06, 2010
0 Comments
552 Visits
lets say you want a script to start at startup of linux. doing this took me a while to find out so i will tell you how about adding a script in your linux system it will start automatically when the kernel is loading or at startup when you linux server is booting..
all you have to do is put the command. log in as root and edit the file:
/etc/rc.d/rc.local
put whatever command you want on the last line, save the changes. thats it.
next time your computer start, it will run this command automatically, this can me be helpful if lets say for example, you want to start a script that you created instead of putting in the init.d
if you want to edit, you can use my favorite text editor nano which comes with fedora, centos, red hat... etc..
shell command:
nano /etc/rc.d/rc.local
as you can see, adding a startup script to be run at bootup is easy.
hope that helps