101-500 practice question 5 of 30

Which of the following commands updates the linker cache of shared libraries?

Full set: 246 questions
Answer options
A: mkcache
B: soconfig
C: mkldconfig
D: lddconfig
E: ldconfig Correct answer
Correct Answer:
E. ldconfig
Explanation

The ldconfig command is the standard utility used to configure the dynamic linker's run-time bindings. It processes directories specified in /etc/ld.so.conf and trusted default paths (like /lib and /usr/lib) to find shared libraries. It then updates the cache file, /etc/ld.so.cache, which the system's dynamic linker uses to quickly locate and load the necessary libraries for an executable at runtime.

Why Incorrect

A. mkcache is not a standard Linux command for managing the shared library cache.
B. soconfig is not a standard Linux command. The .so suffix denotes a shared object, but this command name is fictitious.
C. mkldconfig is not a standard Linux command. It is an incorrect combination of the make prefix and the actual command name.
D. lddconfig is not a standard command. ldd is a utility to list a program's shared library dependencies, not to configure the cache.

References

- Linux ldconfig(8) man page. The description states: "ldconfig creates the necessary links and cache to the most recent shared libraries found in the directories specified... The cache is used by the run-time linker, ld.so or ld-linux.so."

- The Linux Programming Interface, Michael Kerrisk, Chapter 42, Section 42.5 "The Shared Library Cache". It explains that ldconfig is the command used to rebuild the /etc/ld.so.cache file.

- GNU C Library (glibc) Manual, Section 2.3.2 "Configuring the Dynamic Linker". It describes the role of ld.so.cache and identifies ldconfig as the program that creates it.

Scroll to Top