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 |
The closest is the rc.local script.
|
It depends upon the distribution. Lots of them use /etc/rc.d/rc.local
|
You might want to look into runlevels too, /etc/rc0.d /etc/rc1.d ...
|
And for mount commands, you can set that in your /etc/fstab file.
|
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. |
Take a look at this part of the RH Manual:
http://www.redhat.com/docs/manuals/l...-shutdown.html |
Excellent! I think I'll pin that to my forehead. Less likely to forget that way! ;) Thanks!
|
coolies, and i only knew the telnet sessions uses .bash_profile or .plan :) now i know rc.local :) thanks guys~!
|
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. |