LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-26-2003, 04:32 PM   #1
Canaris
LQ Newbie
 
Registered: May 2003
Posts: 17

Rep: Reputation: 0
The Linux version of autoexec.bat ???


Hey!

I am a Linux beginner, so sorry for the stupid question.
I would like to have some programs autostart on bootup. For example some mount commands. But is there a Linux equivalent of the Autoexec.bat?

CU

Canaris
 
Old 05-26-2003, 04:36 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
The closest is the rc.local script.
 
Old 05-26-2003, 04:48 PM   #3
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
It depends upon the distribution. Lots of them use /etc/rc.d/rc.local
 
Old 05-26-2003, 05:13 PM   #4
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
You might want to look into runlevels too, /etc/rc0.d /etc/rc1.d ...
 
Old 05-26-2003, 05:17 PM   #5
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
And for mount commands, you can set that in your /etc/fstab file.
 
Old 05-26-2003, 05:27 PM   #6
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Rep: Reputation: 30
Thumbs up good topic!

Hi,

not meaning to highjack this question could I expand a little more on the question. What is the general order of "autoexec.bat" like files that are executing up to the point of the first login?

ie, would rc.local be the last file run (along with runlevel .d file)? What would come before that? /etc/initrc

I guess that is lethal thing to ask considering all the different distros out there? But let's say for RedHat.
 
Old 05-26-2003, 05:30 PM   #7
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Take a look at this part of the RH Manual:
http://www.redhat.com/docs/manuals/l...-shutdown.html

Last edited by david_ross; 05-26-2003 at 05:31 PM.
 
Old 05-26-2003, 06:03 PM   #8
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Rep: Reputation: 30
Excellent! I think I'll pin that to my forehead. Less likely to forget that way! Thanks!
 
Old 05-27-2003, 07:13 AM   #9
kazuni
Member
 
Registered: May 2003
Location: Hong Kong
Distribution: Android on HTC Hero
Posts: 256

Rep: Reputation: 30
coolies, and i only knew the telnet sessions uses .bash_profile or .plan now i know rc.local thanks guys~!
 
Old 05-27-2003, 08:35 AM   #10
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
For the gentoo-ers there's several places, and really I think it depends on whether you emerge it or build it yourself. For emerge:
rc-update add <application> default
For others, place them in:
/etc/conf.d/local.start (and if you need to stop them) then:
/etc/conf.d/local.stop



I'm sure one of you real gentoo-ers out there know of more, or maybe even the "proper" way to do this, but that's just some more to add

Cool
 
  


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
What is the autoexec.bat and config.sys equivalent of linux lemuel Linux - Newbie 4 12-07-2004 10:34 PM
Linux Startup - AutoExec.bat equivalent? perry Linux - Software 6 05-04-2004 12:13 AM
Autoexec.bat in Linux? sikandar Linux - Software 10 08-31-2003 01:30 PM
autoexec.bat analogous for linux?.... amod Linux - Newbie 2 06-18-2003 06:49 AM
Autoexec.bat Equivalent dwpondscum Linux - Distributions 5 06-16-2003 10:51 AM


All times are GMT -5. The time now is 12:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration