Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I installed Linux last week and got a few Linux books.
Have not been able to find info on how program "paths" are handled. In DOS one either has to be in the directory where the program resides or one has to specify a path in the autoexec.bat file. Could someone please direct me to some info on how this works in Linux?
Usually you type the full path of where the program resides or if your in the directory already. You can also create aliases and such.
Most of the time, I am in the directory on which the program is in and type ./program-name-here
Thanks for that explanation. I am still a little bit mystified though: For instance the command mkbootdisk is in the directory /sbin, but when I am in the root-directory it will run anyhow. So is there some equivalent of a DOS "path" command in Linux?
There is a file where the PATH and aliases are specified. It may be a file called .bashrc or .bash_profile in your home directory, or it can be /etc/bashrc. I'm posting this from a Winblows machine so I can't check for the exact file name but I think it's one of these.
Thanks to the three above who answered. That explains most of it. I am still curious though, how the root knows if it should look for .bash_profile or /etc/bashrc. There has to be SOMETHING that specifies where root should look...? Or does it first look for .bash_profile and if that is not there it looks for /etc/bashrc. I am trying to get some basic understanding for the mechanics here. Because I don't know how this stuff works under Linux, I had to spend a lot of time to figure out that giving a command from the /root is different from doing it from root@localhost /root. (I still don't know why). I could not get mkbootdisk to work from root@localhost but finally got it to work by logging in at the root. If this sounds confused it is because I am..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.