Ldconfig
| ldconfig | |
|---|---|
| Original authors | Sun Microsystems (SunOS), Roland McGrath (Linux/glibc) |
| Developers | GNU Project, most contributions by Ulrich Drepper |
| Initial release | 1988 (SunOS) 1990s (Linux/glibc) |
| Operating system | Linux, FreeBSD |
| Type | Command |
| License | glibc: LGPL-2.1-or-later |
In computing, ldconfig 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.[1] ldconfig works by searching for .so files in directories specified in the /etc/ld.so.conf file, the trusted directories (/lib and /usr/lib, or /lib64 and /usr/lib64 on multilib systems), and any directories specified on the command line.[2][3]
The generated binary cache file, /etc/ld.so.cache, is used by ld.so to speed up library lookup at runtime.[4]
ldconfig can be compared to regsvr32 in Windows and ReactOS, and to dyld in macOS.
History
ldconfig first appeared in SunOS 4.0 which was initially released in 1988.[5][6] 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 ldconfig within the GNU C Library (glibc).
Options
-C CACHE– specify a cache other than the default (/etc/ld.so.cache)-f CONF– specify a configuration file other than the default (/etc/ld.so.conf)-c FORMAT,--format=FORMAT– specify which format to use: new (default), old, or compat)-i,--ignore-aux-cache– ignore the auxiliary cache file-l– manually link individual libraries-n– used to ignore/etc/ld.so.cacheand the trusted directories and only process the directories specified on the command line. (-Nis implied, so the cache won't be rebuilt)-N– skips rebuilding the cache-v,--verbose– runs in verbose mode; prints version number, scanned directories, and all created links-V,--version– prints the version number-X– skips updating links-p– prints the current cache-r ROOT– specify a directory as the root directory
Source:[7]
References
- ^ "Understanding the ldconfig command in Linux". 2022-12-10. Retrieved 2025-09-13.
- ^ "ldconfig(8) - Linux manual page". man7.org. Retrieved 2025-09-13.
- ^ "Linux ldconfig Command With Examples – Linux Hint". Retrieved 2025-09-13.
- ^ "ld.so(8) - Linux manual page". man7.org. Retrieved 2025-09-13.
- ^ "ldconfig". man.freebsd.org. Retrieved 2025-09-13.
- ^ "SunOS 4.x". WinWorld. Retrieved 2025-09-13.
- ^ "3 UNIX / Linux ldconfig Command Examples". linux.101hacks.com. Retrieved 2025-09-13.
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.