Frequently Asked Question
What is the difference between glibc and musl?
Every Linux program, even ls, links against a C standard library that provides the
thin wrapper around system calls (open, read, printf, malloc, and so on). The
overwhelming default is glibc, the GNU C Library, which has been developed under the
FSF umbrella since the early 1990s. It is feature-rich, deeply tested, and assumed by
most binary distributions of software.
musl is a much smaller reimplementation, first released in 2011, with goals of
correctness, simplicity, static-linking friendliness, and a clear (MIT) licence. It
produces smaller binaries with fewer hidden runtime dependencies, which is why Alpine
Linux and many container images choose it. The trade-off is that some glibc-specific
behaviour, locale handling, NSS plugins, certain DNS edge cases, dlopen quirks;
differs subtly, so binaries built against glibc may not run on musl without recompilation.
A few distributions, notably Void Linux musl, provide a full general-purpose system on
musl outside of Alpine.