Building from Source: configure, make, and make install
When no package exists, learn the classic source-build workflow with configure, make, and make install, plus how it relates to package managers.
Building from Source: configure, make, and make install is a free Linux Command Line Mastery lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Linux Command Line Mastery learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
When Packages Are Not Enough
Package managers like apt and dnf cover most needs, but sometimes you must build software from source: a newer version, a missing distro package, or custom compile options.
The Three-Step Dance
Most source projects follow the same ritual:
./configurechecks your systemmakecompiles the codemake installcopies files into place
Getting the Source
Source usually arrives as a compressed tarball, which ties back to the archiving skills you already learned.
tar -xzf hello-2.12.tar.gz
cd hello-2.12Installing Build Tools
You need a compiler and make. On Debian/Ubuntu the meta-package build-essential provides them.
sudo apt install build-essentialRunning configure
./configure probes for libraries and generates a Makefile. The --prefix option chooses where it will install.
./configure --prefix=/usr/localCompiling with make
make reads the Makefile and compiles. Use -j to parallelize across CPU cores for speed.
make -j4Installing the Build
make install copies binaries and data into the prefix. Installing to system paths usually needs root.
sudo make installHandling Missing Dependencies
If configure complains about a missing library, install its -dev package, which provides headers needed for compiling.
sudo apt install libssl-devCleaning Up
make clean removes compiled objects so you can rebuild from scratch.
make cleanUninstalling Source Builds
Source installs are not tracked by your package manager. Many projects offer make uninstall, or you can install to /usr/local to keep them separate from packaged software.
sudo make uninstallSource vs Packages
Prefer packages when possible: they handle dependencies and updates. Build from source only when you need control or a version your distro lacks.
Quick Check
Which step actually compiles the program?
Recap
You can build software the classic way:
- Extract the tarball with
tar ./configure --prefix=...sets up the buildmake -jcompiles,sudo make installinstalls- Install -dev packages for missing headers
Reach for source builds only when packages cannot meet your needs.
Frequently asked questions
Is the “Building from Source: configure, make, and make install” lesson free?
Yes — the full text of “Building from Source: configure, make, and make install” is free to read here on the web, and the Linux Command Line Mastery course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Linux Command Line Mastery course, upgrade to CoddyKit PRO.
What will I learn in “Building from Source: configure, make, and make install”?
When no package exists, learn the classic source-build workflow with configure, make, and make install, plus how it relates to package managers. You practise Linux Command Line Mastery with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Linux Command Line Mastery?
No prior experience is required. Linux Command Line Mastery on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Building from Source: configure, make, and make install” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Linux Command Line Mastery lesson?
Yes. Every Linux Command Line Mastery lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Archiving and Compression: `tar`, `gzip`, `bzip2`
- Package Management (Debian/Ubuntu): `apt`, `dpkg`
- Package Management (CentOS/Fedora): `yum`, `dnf`, `rpm`
- Building from Source: configure, make, and make install