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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Whenever a user under any Linux system types a command (e.g. "who") as far as I know the system starts to look for an appropriate executable.
First in /bin then /etc, /sbin, /usr/bin, /usr/sbin.
Finally it would also try /home/*USER*
(I'm not sure if the items are in the right order but it ought to be something like this).
Now I got the problem that I got an executable in my home-folder which *has* to have a certain name which is also given to a rarely used executable in the /bin folder.
It is quite tiring to explain to everyone who uses the system that he/she should type in /home/*USERNAME*/*EXNAME* instead of just the name.
That is why I wonder if it is possible to change the order that the system looks for the executable for a user, so that it looks into /home/*USERNAME* at first and executes the executable there.
Thanks a lot in advance for the help
If anyone knows another way to have the system run the executable in the home-folder instead of the one in the /bin folder when typing it's name also that hint would be greatly appreciated!
I think it's the order the directory names are put in the $PATH variable. You could change that but maybe it's better/less trauma to system to create a script in /usr/local/bin that will run ~/yourapp. But since the one in /usr/bin is still run before /usr/local/bin the script has to have a different name.
Last edited by Haiyadragon; 11-17-2005 at 02:14 PM.
Type "echo $PATH" in a terminal to see the contents. I'm not sure there will be a negative effect but I can imagine some bad scenarios.
You can use the ".bash_profile" file in the concerning home directory. This file will be run everytime somebody logs in. If the file exists maybe you could check if the path variable is already being altered there (debian, for example, does this by default I think) and change that. If not you can create the file and put something like "export PATH=~:$PATH" in it.