Click to See Complete Forum and Search --> : A good Linux question


twofoolish2b
02-04-2001, 02:08 PM
Hello everyone, I have a good Linux question. What is the file in Linux that does the same thing as autoexec.bat in Windows and DOS.

What I want to do is be able to run a program from any directory with out being in that programs directory. For example, if pmfirewall is in /usr/local/pmfirewall I want to be able to run it form anywhere by just doing ./pmfirewall.

Can this be done? Oh by the way I'm running Slackware 7.1 if that matters.

Muzzafarath
02-04-2001, 02:19 PM
autoexec.bat in Slackware is /etc/rc.d/rc.local. There are several other init files, look in the /etc/rc.d directory...

Lorithar
02-04-2001, 02:31 PM
*grins*

You're actually asking two questions here... I'm running slack 7.1. and 2.2.17 kernel..
Your startup (autoexec.bat files) are in /etc/rc.d/ ... there are a number of them and they run off one another.. it can be a bit confusing.. but read through them and you will get the idea.

Next .. check out /etc/profile and /etc/profile.d/* .. this is where your pathing statements come from..

have fun and hope that helped.. :cool:

Ryeker
02-04-2001, 02:42 PM
Is '/usr/local/pmfirewall' a directory or an exe? If it's a dir, put '/usr/local/pmfirewall' in your path. If it's an exe, move pmfirewall to /usr/local/bin. Then all you will have to type is 'pmfirewall' from anywhere (except the directory you are in). BTW, the ./ means to run the program in the current directory.