New at programming here. I couldn't find this when I searched google and SO, but I was wondering what programmers mean when they say "put X in your path." Is this the usr/bin?
Any other resources I can read up on to understand this?
Thank you!
|
New at programming here. I couldn't find this when I searched google and SO, but I was wondering what programmers mean when they say "put X in your path." Is this the usr/bin? Any other resources I can read up on to understand this? Thank you! |
||||
|
|
They usually mean to
The PATH variable contains a list of colon (
You could put your program in e.g. Alternatively, you could modify that variable to contain
To do it permanently for bash you have to enter this line (without the If you have another shell (bash is the default for most Linux distributions) the commands above should be changed accordingly. |
|||
|
|
|
Well, here is a link by LINFO (The Linux Information Project) : http://www.linfo.org/path_env_var.html It explains to you what it is, how you get it, how you change it, well, everything you need to know about it :) |
|||
|
|
Path is the name of an environment variable in an operating system. Linux, Unix, DOS, Windows and other operating systems have this concept. The Path environment variable defines the folders to be searched for a command or application to be executed. Hence, if X is the folder which contains your command or application, by adding X to your Path, it allows command, scripts or applications in X folder to be executed by just typing its name alone. Try this "echo $PATH" To add X (e.g. /home/x) to $PATH, type PATH=$PATH:/home/x In Linux or Unix, folders are separated by colon (:) while in Dos, Windows, etc, folders are separated by semi-colons (;) |
|||
|
|
The path is a colon-delimited list of directories that contain executables and libraries. When you run a program, for example
|
|||
|
|
|
When executing a program from the command line, the shell look in many directories to find the program. The list of directory to lookup is defined in a variable named PATH. You can print the content with So when you see path X in you path, it means that you can copy X into one of the directory listed in that variable, or you can change the PATH variable to contains the directory where X is located. |
|||
|
|