LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-02-2003, 05:35 AM   #1
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware, CentOS, Ubuntu
Posts: 325

Rep: Reputation: 30
how can i run "sh <file>" automatically when i start linux?


is there a way.... like in windows.... its autoexec.bat....
how about in linux? what is the file that contains the commands that will be performed during startup?
thank you.
 
Old 03-02-2003, 05:42 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Depends on your distro, but most have an rc.local file. Place your .sh file in there with full path and it should start at startup after that. Look for the rc.local file in /etc

Cool
 
Old 03-02-2003, 06:20 AM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Or /etc/rc.d/rc. It 's started earlier (rc.local - after all other scripts).
 
Old 03-02-2003, 10:19 AM   #4
Artimus
Member
 
Registered: Feb 2003
Location: Wisconsin
Distribution: Slackware
Posts: 188

Rep: Reputation: 30
Quote:
Originally posted by Mara
Or /etc/rc.d/rc. It 's started earlier (rc.local - after all other scripts).
Finally somebody else sensative to Slack's init scripts. So what if System V is standard?
 
Old 03-02-2003, 11:08 AM   #5
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware, CentOS, Ubuntu
Posts: 325

Original Poster
Rep: Reputation: 30
i got it...
hmmmm what is System V?
what does it mean? =)
 
Old 03-02-2003, 04:11 PM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
It's the init process. When things are booting up, depending on your init style scripts (Slackware uses BSD Style init scripts, most of your mainstream distros like RH, and Mandy use System V init scripts) you boot up differently.

Cool
 
Old 03-02-2003, 05:00 PM   #7
kkempter
Member
 
Registered: Dec 2002
Posts: 187

Rep: Reputation: 30
The rc scripts are generally for system scripts like bringing up a database or the ftp daemon , etc.. If the script you want to start automatically is more of a user login thing, like a script that sets certian environment variables or executes an end user program; then a better place for it is as an entry in the .bashrc file for the specific user.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 07:42 AM
New SQUID user: How to clear the "access.log" and "store.log" automatically? yuzuohong Linux - Networking 2 12-02-2006 05:37 AM
[SOLVED] "Run Filters on Folder" does not work automatically in Thunderbird Bruce Hill Slackware 8 10-10-2006 02:54 PM
How do you run "xorg.conf.back" file? in Toshiba laptop hajime_saitou0 Linux - Laptop and Netbook 1 09-14-2005 09:03 PM
Kde doesn't start - "Data incomplete in file /etc/X11/XFConfig-4" bertenta Linux - Newbie 3 02-13-2004 11:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration