• 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. gnome-calculator Command Examples in Linux
  2. How to change the default IP address of docker bridge
  3. daemonize: command not found
  4. virsh Command Examples in Linux
  5. groupmod Command Examples in Linux
  6. bspc: command not found
  7. Yum Command – RPM Based Package Management Utility
  8. gcov Command Examples in Linux
  9. How to change the path of the auditd log file /var/log/audit/audit.log
  10. jpegoptim for image optimization

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright