May 2013
Beginner to intermediate
384 pages
7h 40m
English
Environment variables are often used to store a list of paths of where to search for executables, libraries, and so on. Examples are $PATH, $LD_LIBRARY_PATH, which will typically look like this:
PATH=/usr/bin;/bin LD_LIBRARY_PATH=/usr/lib;/lib
This essentially means that whenever the shell has to execute binaries, it will first look into /usr/bin followed by /bin.
A very common task that one has to do when building a program from source and installing to a custom path is to add its bin directory to the PATH environment variable. Let's say in this case we install myapp to /opt/myapp, which has binaries in a directory called bin and libraries in lib.
A way to do this is to say it as follows: ...
Read now
Unlock full access