Add a directory containing custom shared libraries to the system-wide dynamic-linker search path.
Use the conventional glibc configuration.
Which file should be edited?
Add the directory to /etc/ld.so.conf or an included configuration file, then normally run ldconfig to refresh the cache.
Detailed explanation
/proc/cmdlineIncorrect. /proc/cmdline reports kernel command-line arguments.
Incorrect. /proc/cmdline reports kernel command-line arguments.
/etc/fstabIncorrect. /etc/fstab configures filesystems and mounts.
Incorrect. /etc/fstab configures filesystems and mounts.
/etc/ld.so.confまたはそのinclude先Correct. /etc/ld.so.conf and its included files define system-wide library search directories.
Correct. /etc/ld.so.conf and its included files define system-wide library search directories.
/etc/hostsIncorrect. /etc/hosts maps host names to addresses.
Incorrect. /etc/hosts maps host names to addresses.
Try it yourself
An example you can run in a temporary verification environment.
test -r /etc/ld.so.conf && sed -n '1,10p' /etc/ld.so.conf || echo 'ld.so.conf is unavailable'Expected result
検索ディレクトリまたはinclude指定Key points
- ld.so.conf is persistent configuration
- conf.d files can be included
- Run ldconfig after the change
Notes
- Environment: Linux / glibc dynamic linker
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.