Make newly installed shared libraries visible to the runtime linker without rebooting. 16.11.2025 | reading time: 2 min When a new shared library is installed or a library path changes, the runtime linker will not find it until the cache is refreshed; run `ldconfig` so programs pick up the new libraries immediately rather than after a reboot or relogin. Quick lab: add a library and verify Do this on a test machine: copy the library, refresh the cache and confirm the linker sees it: ```sudo cp /tmp/libmyauth.so /usr/local/lib && sudo ldconfig && ldconfig -p | grep libmyauth``` Example output: libmyauth.so (libc6,x86-64) => /usr/local/lib/libmyauth.so When to run ldconfig Run `ldconfig` after installing libraries in standard library directories, after editing files in /etc/ld.so.conf.d, and in package postinstall scripts; run as root and use `ldconfig -p` to inspect the cache or `ldconfig -v` for verbose diagnostics when troubleshooting. Tuning and alternative techniques If you need a custom cache file or config, use `ldconfig -C` or `ldconfig -f` in scripts, use `ldconfig -n` to process only specified directories, and prefer updating /etc/ld.so.conf.d entries or using RPATH for per-application needs rather than relying on LD_LIBRARY_PATH in production. Configuration and runtime checks Keep library directories listed in /etc/ld.so.conf or /etc/ld.so.conf.d, check binary dependencies with `ldd`, and use tools that adjust ELF metadata when a library must be relocated; these steps prevent missing-symbol failures at startup. Next steps for the reader Try adding a small shared library to /usr/local/lib on a VM and practice `ldconfig -p` and `ldconfig -v` until the output becomes familiar; deepen system knowledge and consider formal certification to prove skills, for example CompTIA Linux+ or LPIC-1, and prepare intensively with resources at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. setup filesystem utilities troubleshooting