Exam LFCS All QuestionsBrowse all questions from this exam
Question 28

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

    Correct Answer: C

    LD_LIBRARY_PATH is the environment variable that overrides or extends the list of directories holding shared libraries. This variable is used to specify additional directories where the system should look for shared libraries, extending the default paths set in the system configuration.

Discussion
BuruguduystunstugudunstuyOption: C

Option C. LD_LIBRARY_PATH is the environment variable that overrides or extends the list of directories holding shared libraries. In Linux, shared libraries are compiled object files that are used by multiple programs. They contain code and data that can be shared among different programs, which reduces the size of the programs and speeds up the system. The LD_LIBRARY_PATH environment variable is used to specify the directories that the system should search for shared libraries. It overrides or extends the default search path that is specified in the ld.so.conf configuration file. For example: export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH This adds the /usr/local/lib directory to the search path for shared libraries and prepends it to the existing value of LD_LIBRARY_PATH. Option A: LD_LOAD_PATH is not a recognized environment variable. Option B: LD_LIB_PATH is not a recognized environment variable. Option D: LD_SHARE_PATH is not a recognized environment variable. Option E: LD_RUN_PATH is not a recognized environment variable.

passnowOption: C

LD_LIBRARY_PATH is the predefined environmental variable in Linux/Unix which sets the path which the linker should look in to while linking dynamic libraries/shared libraries.