- So we have just seen how some packages have dependencies,
and these dependencies often relate to libraries.
Now the thing in libraries
is that common functionality is often provided by a library.
And the nice thing about a library
is that different software packages
can use the same libraries.
And that is how libraries make working with software easier.
They provide common functionality
that can be used by multiple packages,
even if some of the libraries are very specific.
But some other libraries are more generic.
One of the most generic libraries is glibc,
also known as libc.
That's the C-library that provides
all of the common functions in the Linux operating system.
And when installing software packages,
libraries normally are installed as dependencies,
if they are not already present of course.
Let me show you how these libraries are used.
So I would like to show you a little bit about libraries.
And libraries, in order to explore them,
you need a full path name to an application.
And ldd is the program that I want to use.
So I'm using ldd on something we have not seen before,
${which passwd}.
What is that?
Well normally,
ldd wants a path name.
But here I'm using a solution
that is creating the path name dynamically.
The ${} are implementing what we call command substitution.
So the command, which passwd,
is executed, it generates its result,
and ldd works on the result of the command,
which is a very nice and frequently used method
to provide content in a dynamic way.
And there we can see all these different libraries.
Now most of these libraries may not need too much,
but I wanna pick out a couple of them,
like libc.
Libc is the generic C-library.
The C-library contains the main functions
of the Linux operating system.
We have libpam,
which is about pluggable authentication models.
We have libcrypt,
which is providing cryptography.
You can imagine that in passwords,
in password management,
different solutions for cryptography may be implemented.
And instead of putting that in the individual module,
a generic library is used, libcrypt.
And this libcrypt library can be used
by many other software packages
that need this cryptography functionality.
And that is how libraries
make working with Linux really much easier.
Most of the libraries that are needed
by the software packages are dynamically loaded.
And you can use ldd, as you see here,
to get an overview of libraries
that are loaded by specific software packets.
And that is providing insight in functionality
that is provided by the software package.
And that can be very useful.