LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-19-2006, 11:12 PM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 447

Rep: Reputation: 30
Question Run script automatically


Friends ,

I am using Redhat Enterprise Linux 4 server . I have written a SCRIPT
into my server . Now I want a situation ,

my "script" is running automatically when my pc is restarting . i.e.,How I can run my script automatically everytime when I reboot
my pc .
 
Old 08-19-2006, 11:34 PM   #2
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
put something like this in your /etc/rc.local file

Code:
sh /path/to/your/script
 
Old 08-20-2006, 12:13 AM   #3
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Another, fairly simple way is yo add a line to crontab

@reboot /your/file/to/run
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run shell script as root automatically elempoimen Linux - Software 8 06-20-2010 01:24 AM
RH8 - how to automatically run a shell script at boot time nu-B Linux - Newbie 2 11-03-2003 02:47 PM
RH8 - how to automatically run iptables rules shell script at boot time nu-B Linux - General 1 10-29-2003 08:38 PM
How do I automatically run at boot an X program or script cmisip Linux - General 4 01-05-2003 06:30 PM
How can the linux OS run script automatically at startup? tommylkc Linux - Newbie 1 06-26-2002 03:09 AM


All times are GMT -5. The time now is 01:12 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration