The environment variable LD_LIBRARY_PATH is used by the dynamic linker/loader (ld.so) to override or extend the default search path for shared libraries at runtime. When a program is executed, the linker searches for required shared libraries in the directories listed in LD_LIBRARY_PATH before consulting the standard system paths (e.g., /lib, /usr/lib, and those listed in /etc/ld.so.conf). This allows users to test custom library versions or run programs with non-standard library locations without modifying system configuration.