Published September 1st, 2025
Created by Gerard Beekmans and Managing Editor: Bruce Dubbs
Copyright © 1999-2025 Gerard Beekmans Copyright © 1999-2025, Gerard Beekmans All rights reserved.
This book is licensed under a Creative Commons License.
Computer instructions may be extracted from the book under the MIT License.
Linux® is a registered trademark of Linus Torvalds.
Packages supplied by LFS needed to satisfy the LSB Requirements
LSB Core: Bash, Bc, Binutils, Coreutils, Diffutils, File, Findutils, Gawk, GCC, Gettext, Glibc, Grep, Gzip, M4, Man-DB, Procps, Psmisc, Sed, Shadow, SysVinit, Tar, Util-linux, Zlib
LSB Desktop: None
LSB Languages: Perl
LSB Imaging: None LSB Gtk3 and
LSB Graphics (Trial Use): None
Packages supplied by BLFS needed to satisfy the LSB Requirements
LSB Core: At, Batch (a part of At), BLFS Bash Startup Files, Cpio, Ed, Fcrontab, LSB-Tools, NSPR, NSS, Linux-PAM, Pax, Sendmail (or Postfix or Exim), Time
LSB Desktop: Alsa, ATK, Cairo, Desktop-file-utils, Freetype, Fontconfig, Gdk-pixbuf, Glib2, GLU, Icon-naming-utils, Libjpeg-turbo, Libxml2, Mesa, Pango, Xdg-utils, Xorg
LSB Languages: Libxml2, Libxslt
LSB Imaging: CUPS, Cups-filters, Ghostscript, SANE LSB Gtk3 and
LSB Graphics (Trial Use): GTK+3
Components not supplied or optionally supplied by LFS or BLFS needed to satisfy the LSB Requirements
LSB Core: install_initd , libcrypt.so.1 (can be provided with optional instructions for the LFS Libxcrypt package), libncurses.so.5 (can be provided with optional instructions for the LFS Ncurses package), libncursesw.so.5 (but libncursesw.so.6 is provided by the LFS Ncurses package)
LSB Desktop: libgdk-x11-2.0.so (but libgdk-3.so is provided by the BLFS GTK+-3 package), libgtk-x11-2.0.so (but libgtk-3.so and libgtk-4.so are provided by the BLFS GTK+-3 and GTK-4 packages), libpng12.so (but libpng16.so is provided by the BLFS Libpng package), libQt*.so.4 (but libQt6*.so.6 are provided by the BLFS Qt6 package), libtiff.so.4 (but libtiff.so.6 is provided by the BLFS Libtiff package)
LSB Languages: /usr/bin/python (LSB requires Python2 but LFS and BLFS only provide Python3)
LSB Imaging: None
LSB Gtk3 and LSB Graphics (Trial Use): libpng15.so (but libpng16.so is provided by the BLFS Libpng package)
Note
Please configure your browser to display fixed-width text with a good monospace, with which you can distinguish the glyphs of Il1 or O0 clearly.
Emphasis
This form of text is used for several purposes in the book. Its main purpose is to emphasize important points or items.
https://www.linuxfromscratch.org
This format is used for hyperlinks both within the LFS community and to external pages. It includes HOWTOs, download locations, and websites.
cat > $LFS/etc/group << "EOF"
root:x:0:
bin:x:1:
......
EOF
This format is used when creating configuration files. The first command tells the system to create the file $LFS/etc/group from whatever is typed on the following lines until the sequence End Of File (EOF) is encountered. Therefore, this entire section is generally typed as seen.
<REPLACED TEXT>
This format is used to encapsulate text that is not to be typed as seen or for copy-and-paste operations.
[OPTIONAL TEXT]
This format is used to encapsulate text that is optional.
passwd(5)
This format is used to refer to a specific manual (man) page. The number inside parentheses indicates a specific section inside the manuals.
For example, passwd has two man pages. Per LFS installation instructions, those two man pages will be located at /usr/share/man/man1/passwd.1 and /usr/share/man/man5/passwd.5 . When the book uses passwd(5) it is specifically referring to /usr/share/man/man5/passwd.5 .
man passwd will print the first man page it finds that matches “passwd,” which will be /usr/share/man/man1/passwd.1 . For this example, you will need to run man 5 passwd in order to read the page being specified.
Note that most man pages do not have duplicate page names in different sections. Therefore, man<program name> is generally sufficient. In the LFS book these references to man pages are also hyperlinks, so clicking on such a reference will open the man page rendered in HTML from Arch Linux manual pages.
Part I - Introduction
Part I explains a few important notes on how to proceed with the LFS installation. This section also provides meta- information about the book.
Part II - Preparing for the Build
Part II describes how to prepare for the building process—making a partition, downloading the packages, and compiling temporary tools.
Part III - Building the LFS Cross Toolchain and Temporary Tools
Part III provides instructions for building the tools needed for constructing the final LFS system.
Part IV - Building the LFS System
Part IV guides the reader through the building of the LFS system—compiling and installing all the packages one by one, setting up the boot scripts, and installing the kernel. The resulting Linux system is the foundation on which other software can be built to expand the system as desired. At the end of this book, there is an easy to use reference listing all of the programs, libraries, and important files that have been installed.
Part V - Appendices
Part V provides information about the book itself including acronyms and terms, acknowledgments, package dependencies, a listing of LFS boot scripts, licenses for the distribution of the book, and a comprehensive index of packages, programs, libraries, and scripts.