ldconfig(8)

๐ŸŒธ ldconfig(8) โ€” the glowy-up for your dynamic linker bindings ๐ŸŒธ

okay bestie, welcome to ldconfig, straight outta the System Manager's Manual. she configures your dynamic linker run-time bindings and she does NOT play. let's get into it ๐Ÿ’…


โœจ NAME โœจ

ldconfig โ€” configure dynamic linker run-time bindings ๐Ÿฆ‹


โœจ SYNOPSIS โœจ

/sbin/ldconfig [-nNvVX] [-C cache] [-f conf] [-r root] [-t tunconf]
               directory ...

/sbin/ldconfig -l [-v] library ...

/sbin/ldconfig -p

three whole modes, she contains multitudes ๐Ÿ’–


โœจ DESCRIPTION โœจ

so here's the tea ๐Ÿซ– ldconfig creates the necessary links and cache to the most recent shared libraries it finds in the directories you hand it on the command line, in the file /etc/ld.so.conf, and in the trusted directories, /lib and /usr/lib. iconic behavior fr fr.

on some 64-bit architectures โ€” think x86-64 โ€” /lib and /usr/lib are the trusted directories for 32-bit libraries, while /lib64 and /usr/lib64 are used for 64-bit libraries. the duality of woman ๐Ÿ˜ญ

the cache is used by the run-time linker, ld.so or ld-linux.so. and when ldconfig is deciding which versions should have their links updated, it checks the header and filenames of the libraries it encounters. very demure, very mindful. it should normally be run by the superuser, because it may need write permission on some root owned directories and files ๐Ÿ‘‘

also: ldconfig will look only at files that are named lib*.so* (for regular shared objects) or ld-*.so* (for the dynamic loader itself). everything else gets ignored, sorry not sorry ๐Ÿ™ˆ

and it expects a certain pattern to how the symbolic links are set up, like this example, where the middle file (libfoo.so.1 here) is the SONAME for the library:

libfoo.so -> libfoo.so.1 -> libfoo.so.1.12
not following that pattern may result in compatibility issues after an upgrade. like, actual chaos. respect the chain bestie โ›“๏ธ

if the file /etc/tunables.conf exists, it contains tunables to be applied to all processes. these tunables get stored in the cache and applied to every process at its startup. main character energy, applying herself to literally every process โœจ


โœจ OPTIONS โœจ

  • --format=fmt, -c fmt โ€” (since glibc 2.2) use cache format fmt, which is one of old, new, or compat. since glibc 2.32, the default is new. before that, it was compat. glow-up timeline ๐Ÿ“ˆ
  • -C cache โ€” use cache instead of /etc/ld.so.cache.
  • -f conf โ€” use conf instead of /etc/ld.so.conf.
  • --ignore-aux-cache, -i โ€” (since glibc 2.7) ignore the auxiliary cache file. out of sight, out of mind ๐Ÿซถ
  • -l โ€” (since glibc 2.2) interpret each operand as a library name and configure its links. intended for use only by experts. like, this is not a beginner slope, bestie ๐Ÿ’€
  • -n โ€” process only the directories specified on the command line; don't process the trusted directories, nor those specified in /etc/ld.so.conf. implies -N. tunnel vision, but make it intentional ๐ŸŽ€
  • -N โ€” don't rebuild the cache. unless -X is also specified, links are still updated.
  • --print-cache, -p โ€” print the lists of directories and candidate libraries stored in the current cache. show me the receipts ๐Ÿ”
  • -r root โ€” change to and use root as the root directory.
  • -t tunconf โ€” use tunconf instead of /etc/tunables.conf.
  • --verbose, -v โ€” verbose mode. print current version number, the name of each directory as it is scanned, and any links that are created. overrides quiet mode. she's talking now and you WILL listen ๐Ÿ—ฃ๏ธ
  • --version, -V โ€” print program version. slay โœจ
  • -X โ€” don't update links. unless -N is also specified, the cache is still rebuilt.

โœจ FILES โœจ

  • /lib/ld.so โ€” is the run-time linker/loader. the one doing the actual running around here ๐Ÿƒโ™€๏ธ
  • /etc/ld.so.conf โ€” see ld.so.conf(5).
  • /etc/tunables.conf โ€” see tunables.conf(5).
  • /etc/ld.so.cache โ€” contains an ordered list of libraries found in the directories specified in /etc/ld.so.conf, as well as those found in the trusted directories, and any tunables listed in /etc/tunables.conf. the master list, the notes app of libraries ๐Ÿ“

โœจ SEE ALSO โœจ

ldd(1), ld.so(8), ld.so.conf(5) โ€” go read the whole friend group ๐Ÿ’œ


and that's the whole page bestie, no cap. this was Linux man-pages 6.20, dated 2026-08-03, serving ldconfig(8) realness. you ate that. periodt ๐Ÿ’…๐ŸŽ€โœจ

๐Ÿ“ฆ where this page comes from
  • arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • ๐Ÿ“œ the page's license: GPL-2.0-or-later
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms