• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ldconfig Command Options

by admin

ldconfig command is used to tell the system about new locations of shared libraries, the ldconfig command uses information provided by the /etc/ld.so.conf file.

The ldconfig command creates a cache database of all libraries based on the configura- tion file. This cache is normally stored in the /etc/ld.so.cache file. Here is the syntax of the ldconfig command:

# ldconfig [option]

Example:

$ ldconfig -p | head
945 libs found in cache '/etc/ld.so.cache'
         p11-kit-trust.so (libc6,x86-64) => /lib64/p11-kit-trust.so 
         libzapojit-0.0.so.0 (libc6,x86-64) => /lib64/libzapojit-0.0.so.0
         libz.so.1 (libc6,x86-64) => /lib64/libz.so.1
         libyelp.so.0 (libc6,x86-64) => /lib64/libyelp.so.0 
         libyaml-0.so.2 (libc6,x86-64) => /lib64/libyaml-0.so.2 
         libyajl.so.2 (libc6,x86-64) => /lib64/libyajl.so.2 
         libxtables.so.10 (libc6,x86-64) => /lib64/libxtables.so.10 
         libxslt.so.1 (libc6,x86-64) => /lib64/libxslt.so.1 
         libxshmfence.so.1 (libc6,x86-64) => /lib64/libxshmfence.so.1

ldconfig Command Options

Option Description
-c fmt, –format=fmt Cache format to use: old, new, or compat.
-C cache Use cache instead of /etc/ld.so.cache.
-f conf Use conf instead of /etc/ld.so.conf.
-i, –ignore-aux-cache Ignore auxiliary cache file.
-l Library mode. Manually link individual libraries. Intended for use by experts only.
-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.
-N Don’t rebuild the cache. Unless -X is also specified, links are still updated.
-p, –print-cache Print the lists of directories and candidate libraries stored in the current cache.
-r root Change to and use root as the root directory.
-v, –verbose Verbose mode. Print current version number, the name of each directory as it is scanned, and any links that are created. Overrides quiet mode.
-V, –version Print program version.
-X Don’t update links. Unless -N is also specified, the cache is still rebuilt.

Filed Under: CentOS/RHEL, Fedora, Linux

Some more articles you might also be interested in …

  1. Unable To Join Linux Samba Server To Windows Active Directory Domain
  2. How to Configure NFS Services (server-side) to Run on Static Ports as an Alternative CentOS/RHEL 5 and 6
  3. How to Calculate Memory Usage in Linux using sar, ps, and free
  4. How to List and Set SELinux Context for MySQL Server
  5. Troubleshooting kdump Issues in CentOS/RHEL
  6. RHV – What is the process of LV Extension
  7. What is Soft Links and Hard Links in Linux File System
  8. Linux Vs Windows – Why Linux Is Better For Programming & Web Dev
  9. 12 RPM (Red Hat Package Manager) Command Examples
  10. Unable To Remove Files From Directory with Error “Argument list too long”

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright