| 1 |
.\" Copyright, the authors of the Linux man-pages project |
| 2 |
.\" |
| 3 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 4 |
.\" |
| 5 |
.TH libc 7 2025-12-25 "Linux man-pages 6.18" |
| 6 |
.SH NAME |
| 7 |
libc \- overview of standard C libraries on Linux |
| 8 |
.SH DESCRIPTION |
| 9 |
The term \[lq]libc\[rq] is commonly used as a shorthand for |
| 10 |
the \[lq]standard C library\[rq] |
| 11 |
a library of standard functions that can be used by all C programs |
| 12 |
(and sometimes by programs in other languages). |
| 13 |
Because of some history |
| 14 |
(see below), |
| 15 |
use of the term \[lq]libc\[rq] |
| 16 |
to refer to the standard C library is somewhat ambiguous on Linux. |
| 17 |
.SS glibc |
| 18 |
By far the most widely used C library on Linux is the |
| 19 |
.UR http:\://www.gnu.org\:/software\:/libc/ |
| 20 |
GNU C Library |
| 21 |
.UE , |
| 22 |
often referred to as |
| 23 |
.IR glibc . |
| 24 |
This is the C library that is nowadays used in all |
| 25 |
major Linux distributions. |
| 26 |
It is also the C library whose details are documented |
| 27 |
in the relevant pages of the |
| 28 |
.I man-pages |
| 29 |
project |
| 30 |
(primarily in Section 3 of the manual). |
| 31 |
Documentation of glibc is also available in the glibc manual, |
| 32 |
available via the command |
| 33 |
.IR "info libc" . |
| 34 |
Release 1.0 of glibc was made in September 1992. |
| 35 |
(There were earlier 0.x releases.) |
| 36 |
The next major release of glibc was 2.0, |
| 37 |
at the beginning of 1997. |
| 38 |
.P |
| 39 |
The pathname |
| 40 |
.I /lib/libc.so.6 |
| 41 |
(or something similar) |
| 42 |
is normally a symbolic link that |
| 43 |
points to the location of the glibc library, |
| 44 |
and executing this pathname will cause glibc to display |
| 45 |
various information about the version installed on your system. |
| 46 |
.SS Linux libc |
| 47 |
In the early to mid 1990s, |
| 48 |
there was for a while |
| 49 |
.IR "Linux libc" , |
| 50 |
a fork of glibc 1.x created by Linux developers who felt that glibc |
| 51 |
development at the time was not sufficing for the needs of Linux. |
| 52 |
Often, |
| 53 |
this library was referred to (ambiguously) as just \[lq]libc\[rq]. |
| 54 |
Linux libc released major versions 2, 3, 4, and 5, |
| 55 |
as well as many minor versions of those releases. |
| 56 |
Linux libc4 was the last version to use the a.out binary format, |
| 57 |
and the first version to provide (primitive) shared library support. |
| 58 |
Linux libc 5 was the first version to support the ELF binary format; |
| 59 |
this version used the shared library soname |
| 60 |
.IR libc.so.5 . |
| 61 |
For a while, |
| 62 |
Linux libc was the standard C library in many Linux distributions. |
| 63 |
.P |
| 64 |
However, |
| 65 |
notwithstanding the original motivations of the Linux libc effort, |
| 66 |
by the time glibc 2.0 was released |
| 67 |
(in 1997), |
| 68 |
it was clearly superior to Linux libc, |
| 69 |
and all major Linux distributions that had been using Linux libc |
| 70 |
soon switched back to glibc. |
| 71 |
To avoid any confusion with Linux libc versions, |
| 72 |
glibc 2.0 and later used the shared library soname |
| 73 |
.IR libc.so.6 . |
| 74 |
.P |
| 75 |
Since the switch from Linux libc to glibc 2.0 occurred long ago, |
| 76 |
.I man-pages |
| 77 |
no longer takes care to document Linux libc details. |
| 78 |
Nevertheless, |
| 79 |
the history is visible in vestiges of information |
| 80 |
about Linux libc that remain in a few manual pages, |
| 81 |
in particular, |
| 82 |
references to |
| 83 |
.I libc4 |
| 84 |
and |
| 85 |
.IR libc5 . |
| 86 |
.SS Other C libraries |
| 87 |
There are various other less widely used C libraries for Linux. |
| 88 |
These libraries are generally smaller than glibc, |
| 89 |
both in terms of features and memory footprint, |
| 90 |
and often intended for building small binaries, |
| 91 |
perhaps targeted at development for embedded Linux systems. |
| 92 |
Among such libraries are |
| 93 |
.UR http:\://www\:.uclibc\:.org/ |
| 94 |
.I uClibc |
| 95 |
.UE , |
| 96 |
.UR http:\://www\:.fefe\:.de/\:dietlibc/ |
| 97 |
.I dietlibc |
| 98 |
.UE , |
| 99 |
and |
| 100 |
.UR http:\://www\:.musl\-libc\:.org/ |
| 101 |
.I "musl libc" |
| 102 |
.UE . |
| 103 |
Details of these libraries are covered by the |
| 104 |
.I man-pages |
| 105 |
project, |
| 106 |
where they are known. |
| 107 |
.SH SEE ALSO |
| 108 |
.BR syscalls (2), |
| 109 |
.BR getauxval (3), |
| 110 |
.BR proc (5), |
| 111 |
.BR feature_test_macros (7), |
| 112 |
.BR man\-pages (7), |
| 113 |
.BR standards (7), |
| 114 |
.BR vdso (7) |