The Unix And Linux Common PATH-like Environment Variables

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
/usr/man:/usr/share/man:/usr/local/man:/usr/local/share/man:/usr/X11R6/man:/opt/man

3. LD_LIBRARY_PATH:

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.

4. JAVA_HOME:

By respecting the same logic, the Sun Java Development Kit (JDK) uses the JAVA_HOME variable.

5. PERL5LIB:

The PERL5LIB is the environment variable used for the perl libraries.

PERL5LIB’s common value:

/usr/local/lib/site-perl:/usr/lib/site-perl:/usr/lib/perl:/usr/share/perl

6. PYTHONPATH:

The Python’s libraries are stored in the PYTHONPATH env:

Common value:
/usr/local/lib/python:/usr/lib/python:/usr/lib/python2.6

7. TCLLIBPATH:

The TCL libraries.

Common value:
/usr/local/lib/tcltk:/usr/lib/tcltk

Tagged with: , , , , , ,
Posted in The Linux and Unix Articles!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!