What does MANPATH, LD_LIBRARY_PATH mean in Linux?

What does MANPATH and LD_LIBRARY_PATH mean in Linux ? What are the uses of these?


Solution 1:

  • MANPATH. See "2.3.2. The man pages". MANPATH is the path to the manual pages.
  • LD_LIBRARY_PATH. See "3.3.1. LD_LIBRARY_PATH".

    In Linux, the environment variable LD_LIBRARY_PATH is a colon-separated set of directories where libraries should be searched for first, before the standard set of directories; this is useful when debugging a new library or using a nonstandard library for special purposes. The environment variable LD_PRELOAD lists shared libraries with functions that override the standard set, just as /etc/ld.so.preload does. These are implemented by the loader /lib/ld-linux.so. I should note that, while LD_LIBRARY_PATH works on many Unix-like systems, it doesn't work on all; for example, this functionality is available on HP-UX but as the environment variable SHLIB_PATH, and on AIX this functionality is through the variable LIBPATH (with the same syntax, a colon-separated list).