how can you tell whether a program is statically linked? And if it is dynamically linked, how do you know what libraries it needs? The ldd command can answer both questions shiv@ubuntu:~$ ldd /sbin/ldconfig not a dynamic executable (ldconfig is not dynmic loadable) shiv@ubuntu:~$ ldd /bin/ln (ln is dynamic loadable but it needs below listed things to run) linux-gate.so.1 => (0x00918000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00110000) /lib/ld-linux.so.2 (0x0033f000) ldconfig ------------ you use the ldconfig command without parameters to rebuild ld.so.cache ldconfig -p | less to display ld.so.cache how does the dynamic loader know where to look for executables? >>As with many things on Linux, there is a configuration file in /etc. shiv@...
C and Linux with Examples!!!