LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   The Linux version of autoexec.bat ??? (https://www.linuxquestions.org/questions/linux-newbie-8/the-linux-version-of-autoexec-bat-61943/)

Canaris 05-26-2003 03:32 PM

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

david_ross 05-26-2003 03:36 PM

The closest is the rc.local script.

fancypiper 05-26-2003 03:48 PM

It depends upon the distribution. Lots of them use /etc/rc.d/rc.local

iceman47 05-26-2003 04:13 PM

You might want to look into runlevels too, /etc/rc0.d /etc/rc1.d ...

fancypiper 05-26-2003 04:17 PM

And for mount commands, you can set that in your /etc/fstab file.

hamster 05-26-2003 04:27 PM

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.

david_ross 05-26-2003 04:30 PM

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

hamster 05-26-2003 05:03 PM

Excellent! I think I'll pin that to my forehead. Less likely to forget that way! ;) Thanks!

kazuni 05-27-2003 06:13 AM

coolies, and i only knew the telnet sessions uses .bash_profile or .plan :) now i know rc.local :) thanks guys~!

MasterC 05-27-2003 07:35 AM

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


All times are GMT -5. The time now is 05:21 AM.