In computing, <code>ldconfig</code> is a shell command used for creating and updating symbolic links and the cache for shared libraries. It is found in most Linux distributions and FreeBSD, and it is part of the glibc package. <code>ldconfig</code> works by searching for <code>.so</code> files in directories specified in the <code>/etc/ld.so.conf</code> file, the trusted directories (<code>/lib</code> and <code>/usr/lib</code>, or <code>/lib64</code> and <code>/usr/lib64</code> on multilib systems), and any directories specified on the command line.
The generated binary cache file, <code>/etc/ld.so.cache</code>, is used by ld.so to speed up library lookup at runtime.
<code>ldconfig</code> can be compared to <code>regsvr32</code> in Windows and ReactOS, and to <code>dyld</code> in macOS.
<code>ldconfig</code> first appeared in SunOS 4.0 which was initially released in 1988. Due to the adoption of the Executable and Linkable Format by the Unix community, the need for a more robust and flexible library management system became apparent. This led to the development of <code>ldconfig</code> within the GNU C Library (glibc).
Source: