Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-13-2005, 07:37 PM   #1
Registered: Jul 2004
Distribution: Debian, Ubuntu, FreeBSD, RHEL
Posts: 202

Rep: Reputation: 31
bash scripting..

hey guys.. iam a newbie when its coming to bash scripting.. and stuff. i just started to learn it recently and i love it..

but this is my question.. i have made up my scripts.. but i want them to be executed upon bootup... now which startup file is good to edit so i can put my script ( i wont be putting the actual code in.. i will just be simply adding this line "./myscript" )
Old 04-13-2005, 07:46 PM   #2
Senior Member
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,292

Rep: Reputation: 65
The last one run for the system is /etc/rc.d/rc.local for many distributions, but not for debian.
If you want them run for a specific user at login, put them in .bashrc or similar in the user's home dir. If you want them run for all users at login then /etc/profile or similar.
Old 04-13-2005, 07:49 PM   #3
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
On my FC3 box, I put a line in /etc/rc.d/rc.local

Old 09-21-2005, 01:07 AM   #4
Registered: Jul 2005
Location: San Francisco
Distribution: Fedora Core 6
Posts: 64

Rep: Reputation: 15
since it is a sym link to /etc/rc.d/rc.local
you can even have it run the script as another which is best practices

su username -c /path/to/script


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
Bash scripting pete1234 Programming 1 09-27-2005 02:48 AM
BASH If-then-else Scripting Help xianzai Programming 4 10-29-2004 05:09 AM
Bash scripting Gunslinger_ROL Programming 5 09-28-2004 12:37 PM
Bash scripting JonCooperUK Programming 3 03-04-2004 09:55 PM
Bash scripting kbeaver Programming 5 07-18-2003 09:35 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:09 PM.

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