You already know what are the PATH and the CDPATH and how to use them. In this article I will list you the other common Linux and Unix PATH variables, and give some short explenations of how to use them.
Unix philosophy 1: Every command is a file.
It is very simple, actually. On all the Unix distros, the cp command works by default because it’s path is added in the PATH variable.
Some other PATH-like environment variables:
1. The CDPATH.
2. The MANPATH.
As the name suggests, the MANPATH is the environemt variable that makes MAN’s magic work:
These is the default MANPATH on my Linux Mint box:
$ manpath -g
The LD_LIBRARY_PATH is the PATH for the libraries (as the name suggests) The LD in the name comes from “dynamic loader”, the component that loads the libraries into dynamically linked executables.
By respecting the same logic, the Sun Java Development Kit (JDK) uses the JAVA_HOME variable.
The PERL5LIB is the environment variable used for the perl libraries.
PERL5LIB’s common value:
The Python’s libraries are stored in the PYTHONPATH env:
The TCL libraries.