How can i make app to run without path like Firefox and others?
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.
This is because the binary file for firefox is in the path.
if you type echo $PATH at the command line it will tell you which directories are part of your path
Read the links below, that should get you started
http://www.troubleshooters.com/linux/prepostpath.htm should help you understand how it works
Just put your program somwhere in your PATH. Usually many distributions include the directory $HOME/bin in the user's PATH, so you can just create (if missing) the directory $HOME/bin and put your executables there. First verify that $HOME/bin is in your PATH, otherwise you can add it. If in doubt post the output of the command:
so that we can take a look at your current PATH settings.
why are there more than 1 directory?? It's a bit confusing. Which 1 is the best?
Because binaries can live in many directories. You can put your programs in either of these dirs or add a directory to the $PATH, read the info given above in that links to know how.
There's no "best" directory, though the convention is to either add a new directory or to put your programs in /usr/local/bin, so they won't get overwritten by your package manager in the future or something. Note also that the directories will be looked up in the same order they are set in your $PATH, that means that the first binary found with a given name will be used, so the ordering of the $PATH, and whether you append or pre-pend a new path is very important.
This is nothing new by the way, DOS already used a similar mechanism, with the difference that in DOS, the current dir (.) was included in your $PATH by default, but in Linux it isn't (security flaw).
Have you gone through the links? They give you the information needed? There is no best. You can put the excutable anywhere you want and put that directory in your PATH variable and you will be able to use it like you said you want to. But by default the path variable has the locations that I already mentioned. These are the locations where by default the applications or the excutables are placed or applications are installed here by default.