nerdexam
Linux_Foundation

LFCS · Question #822

Which of the following environment variables overrides or extends the list of directories holding shared libraries?

The correct answer is C. LD_LIBRARY_PATH. The LD_LIBRARY_PATH environment variable is used in Linux to specify a colon-separated list of directories to be searched for shared libraries before the standard system directories.

Submitted by olafpl· Apr 18, 2026Operation of Running Systems

Question

Which of the following environment variables overrides or extends the list of directories holding shared libraries?

Options

  • ALD_LOAD_PATH
  • BLD_LIB_PATH
  • CLD_LIBRARY_PATH
  • DLD_SHARE_PATH
  • ELD_RUN_PATH

How the community answered

(30 responses)
  • A
    3% (1)
  • B
    3% (1)
  • C
    87% (26)
  • E
    7% (2)

Why each option

The `LD_LIBRARY_PATH` environment variable is used in Linux to specify a colon-separated list of directories to be searched for shared libraries before the standard system directories.

ALD_LOAD_PATH

`LD_LOAD_PATH` is not a standard environment variable used for specifying shared library search paths in Linux.

BLD_LIB_PATH

`LD_LIB_PATH` is not the correct standard environment variable for this purpose; it is a common misspelling of `LD_LIBRARY_PATH`.

CLD_LIBRARY_PATHCorrect

The `LD_LIBRARY_PATH` environment variable is specifically designed to override or extend the default search paths for dynamic linker/loader to find shared libraries, allowing users to test newer library versions or custom libraries without modifying system configurations. When an application attempts to load a shared library, the dynamic linker first checks the directories specified in this variable.

DLD_SHARE_PATH

`LD_SHARE_PATH` is not a recognized environment variable for controlling shared library search paths.

ELD_RUN_PATH

`LD_RUN_PATH` is a linker option for embedding library search paths into an executable at compile time, not an environment variable for runtime overriding.

Concept tested: Linux shared library loading path

Source: https://man7.org/linux/man-pages/man8/ld.so.8.html

Topics

#Environment variables#Shared libraries#Dynamic linking#Library paths

Community Discussion

No community discussion yet for this question.

Full LFCS Practice