From the course: Exploring Linux Internals: Advanced Insights and Practical Applications

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Accessing libraries

Accessing libraries

- Let's talk about libraries. So Linux programs need access to common functionality. And this is functionality that is often required by other programs as well. And instead of compiling this functionality directly into the program, shared libraries are used. A large set of libraries is used to provide access to the most common Linux functionality. Library access can be taken care of in different ways. Programs can be linked to libraries in a dynamic or in a static way. Static linking requires the library functions to be compiled into the program file. And dynamic linking allows the program file to load functions from external library files. Dynamically linking is a standard. Almost all programs are dynamically linked to their libraries because it's more flexible. The ldconfig program is one example of static linking, and that is making sense because ldconfig is used to load libraries. You can use ldd to get information about program library access and it'll show you all the…

Contents