Script to run at startup

How to make the scrip to startup automatically when linux reboot everything ?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Alexander Eßer [Alex140181]Software DeveloperCommented:
Which distribution?
Also,  before rebooting only or before any startup ? Here we have come to the runlevels of Linux (commands "service", "chkconfig" , files /etc/init.d/* are to be considirated...)
I totally agree , that we are fully depend on the distribution ( e.g cat /proc/version, cat /etc/issue) and futhermore
 on the task  we are assigned.

For example, at one OpenSuse 12.1 box i can lay my hands on, there is /etc/init.d/boot.local script, which is supposed to run when system starts
#! /bin/sh
# script with local commands to be executed from init on system startup
# Here you should add things, that should happen directly after booting
# before we're going to the first run level.
Gerwin Jansen, EE MVETopic Advisor Commented:
You can put your script in the crontab and prepend with @reboot


@reboot /path/to/your/script
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

AXISHKAuthor Commented:
I'm using redhat 5.

the scrip is under \apps\

should we make chkconfig followed by a path \apps\ ?

Gerwin Jansen, EE MVETopic Advisor Commented:
Use / instead of \

Any reason why you still have RH5? That's quite old...
Slashes are wrong. Are you sure you do not run Windows 5 (aka 2000) ?
AXISHKAuthor Commented:
typo mistake only.

chkconfig can followed by a full path name of the script, correct ? Tks
Read manual pages:
$ man chkconfig

Then type
/path name

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.