Bootstrap FreeKB - Linux Fundamentals - $LD_LIBRARY_PATH variable
Linux Fundamentals - $LD_LIBRARY_PATH variable

Updated:   |  Linux Fundamentals articles

LD_LIBRARY_PATH is an environmental variable that will contain one or more paths that the linker will search for when the linker is searching for a shared file. For example, LD_LIBRARY_PATH may contain something like this. The directories in LD_LIBRARY_PATH will be searched before the /lib and /usr/lib directories are searched.

LD_LIBRARY_PATH=/opt/foo:/usr/bar

 

LD_LIBRARY_PATH can temporarily be defined on the command line.

~]# LD_LIBRARY_PATH=/opt/foo:/usr/bar

~]# echo $LD_LIBRARY_PATH
/opt/foo:/usr/bar

 

Better yet, LD_LIBRARY_PATH can be defined in your /home/username/.bash_profile file, so that every time you sign into the system, your PATH will contain the directories defined in your .bash_profile file.

LD_LIBRARY_PATH=/opt/foo:/usr/bar
export LD_LIBRARY_PATH



Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 896eac in the box below so that we can be sure you are a human.