in my path???
I am very new to linux and am catching on fairly quickly. But the folks I work with who are old UNIX folks (all 50 + years old) use lingo that confuses me.
I tried to run a command with one of them over my shoulder. They said "You do not have to type all that it is in your path". What the heck does that mean? I dont have to specify a path to a file if it is in my path? How do I know what is in my path? and what exactly is my path? Confused!! :) Thanks in advance. |
PATH is an environment variable used to store a list of directories in which the shell looks for commands (executables). To see the list of directories listed in your PATH, run "echo $PATH" in a terminal (without quotes). FWIW, Windows also has an environment variable called PATH.
|
http://www.faqs.org/docs/Linux-mini/Path.html
Your $PATH is basically a list of directories that the command line will look for when you type a one word command. For example, if /usr/bin is in your PATH and there is a program /usr/bin/firefox, you can just type firefox because it will look in /usr/bin for that program. If /usr/bin is not in your path and you type firefox, then it will return a "command not found" type error. |
Ahh thank you, can you add a specific directory to your path?
|
Yes, of course you can. How you do so depends on the kind of shell you're using.
For bash and sh (possibly ksh as well, I'm not sure): export PATH=$PATH:/path/to/new/directory For (t)csh (and whatever shells use the same syntax): setenv PATH {$PATH}:/path/to/new/directory |
To add to the end of the path
Code:
PATH=$PATH:/whatever/path |
Well I thank you fine folks again, not only have I found a new interest in this open source community for its functionality but also because the people involved are so quick to help and share knowledge! Thanks again
|
To make the change permanent between reboots, you have to add it to your profile or .bashrc (I think it differs depending on the distribution).
|
All times are GMT -5. The time now is 11:11 PM. |