Use it when building or deploying software that is not packaged, or when a program fails because of libraries.
Software & Source
Software and source management on Linux covers version control (Git), building software from source (compilers, make, build systems) and how programs find their libraries.
1. Package available? apt search / dnf search.
2. Build deps installed (build-essential / Development Tools)?
3. Build: ./configure --prefix=/usr/local && make && sudo make install (or the project's tool).
4. Runtime libraries: ldd <binary>.
5. Version control: git status.
source in Git → dependencies installed → built → installed in /usr/local or /opt → libraries resolved
For Software & Source, continue with the first unproven Topic check: Pin source origin/revision, build options, compiler/toolchain version and target architecture. If that boundary is healthy, advance to the adjacent check: Start from a known build state and capture dependency/header discovery rather than assuming the host environment. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
makePrimary Commands
Configuration and operational commands for this Topic.
makeReferenceEvaluate build rules and execute the commands needed to bring declared targets up to date.
Use when: Primary lookup intent: configure. Use make when the lookup goal is to evaluate build rules and execute the commands needed to bring declared targets up to date. Tie the result to the same host, namespace, user identity and time window as the symptom.
Quick note: Post-change verification for make: Verify generated/installed artifacts and run the project tests or original consuming workload. Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: configure. Safety class: changes_state. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. make is documented as an operational lookup primitive under Software & Source. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.
gccReferenceCompile, assemble and link C or related source code according to selected toolchain options.
Use when: Primary lookup intent: configure. Use gcc when the lookup goal is to compile, assemble and link C or related source code according to selected toolchain options. Tie the result to the same host, namespace, user identity and time window as the symptom.
Quick note: Post-change verification for gcc: Verify artifact identity/version and execute the original functional or test-suite workload. Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: configure. Safety class: changes_state. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. gcc is documented as an operational lookup primitive under Software & Source. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
source/revision → build instructions → toolchain → headers/dependencies → compile → link → artifact identity → install/runtime loader → workload verification
Healthy evidence: the intended source revision and toolchain produce the expected artifact, dependencies resolve as intended, runtime linking is correct and the workload passes
Step 2 Commands Verify boundary
git --version
gcc --version
ldd /usr/bin/curl
pkg-config --list-all | head
Step 3 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Pin source origin/revision, build options, compiler/toolchain version and target architecture.
- Start from a known build state and capture dependency/header discovery rather than assuming the host environment.
- Identify the produced artifact and inspect its linked/shared-library requirements before installation.
- Run the installed artifact in the intended runtime environment and repeat the original acceptance test.
Verification chain. source/revision → build instructions → toolchain → headers/dependencies → compile → link → artifact identity → install/runtime loader → workload verification
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: wrong revision, stale build outputs, mixed toolchains, missing headers, unintended library versions or loader-path differences make a nominally successful build behave incorrectly
Step 5 Common mistakes Narrow the fault
- Installing from source into
/usrand conflicting with packages (use/usr/local).
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
Git in the Linux Software & Source branch covers using a repository as the local source input for a build: repository identity, checked-out commit, dirty state, submodules and reproducible handoff into the build process.
Subtopic Build ToolsBuild Tools covers the Linux build orchestration layer such as make and project-specific generators, including dependency graphs, targets, environment, incremental state and clean/reproducible builds.
Subtopic LibrariesLibraries covers reusable code dependencies consumed during Linux build or runtime, including development headers, static archives, shared objects, ABI/API compatibility and version selection.
Subtopic Shared LibrariesShared Libraries covers Linux ELF dynamic linking: DT_NEEDED entries, SONAMEs, loader search order, ld.so cache, RPATH/RUNPATH, architecture and symbol/ABI resolution.
Prefer distribution packages; build from source only when needed and install into /usr/local or /opt. Track source in Git. Record build dependencies so builds are reproducible.
git status / git log --oneline -5— repository stateldd <binary>— shared librariesldconfig -p | grep <lib>— libraries in the linker cachemake --version; gcc --version— build tools
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
A successful checkout, make invocation or compiler exit shows only one stage; the intended artifact and runtime behavior must be verified independently.
In depth
Source code and software on Linux servers
Administrators handle source code more than they might expect: configuration repositories, infrastructure as code, scripts, and software built from source. Git is the common tool. The Pro Git book describes its model:
- Git stores snapshots, not lists of changes, and unchanged files are just links to the previous version.
- Almost every operation is local, so history and commits work offline.
- Everything is checksummed, so changes can't go unnoticed.
- Files move between three states: modified, staged and committed. Those correspond to the working tree, the staging area (index) and the
.gitdirectory.
Software sources on a server, in order of preference
| Source | Updates | Notes |
|---|---|---|
| Distribution packages | Through apt or dnf | Security updates handled for you |
| Vendor repositories | Through apt or dnf | Add with Signed-By / gpgcheck |
| Language package managers (pip, npm, cargo) in a virtual environment | Per project | Don't install into the system Python |
| Containers | Rebuild and redeploy | Isolated dependencies |
Built from source into /usr/local or /opt | Manual | You own security updates |
Keeping configuration in Git
| Practice | Reason |
|---|---|
| One repository per service or per host role | Review and history |
| No secrets in the repository | Use a vault, or encrypted files (SOPS, Ansible Vault) |
| Deploy from Git with automation | The server matches the repository |
etckeeper for /etc | Records changes made by hand or by packages |
host$ git -C /srv/infra status --short | head
M roles/nginx/templates/site.conf.j2
?? roles/nginx/files/new-cert.pem
host$ git -C /srv/infra diff --stat
host$ git -C /srv/infra log --oneline -3
4b1e2f0 nginx: raise client_max_body_size for uploads
9c02a11 monitoring: add disk alert thresholds
host$ git -C /srv/infra log --all -p | grep -c "BEGIN .*PRIVATE KEY"
0
host$ python3 -m venv /opt/reporttool/venv && /opt/reporttool/venv/bin/pip install reporttool==2.3.1
host$ ls /usr/local/bin /opt
Reading the status
One template is modified, and an untracked file looks like a certificate. Private keys and certificates with keys shouldn't be committed. The git log -p search confirms that no private key has ever been committed in the history. Keys committed once remain in the history even after deletion.
Documented example, not captured output.
How it works at runtime
Software & Source is part of Software & Source. Linux Software & Source covers obtaining, building, linking and running software from source or source-controlled inputs while keeping source revision, toolchain, dependencies, produced artifacts and runtime behavior as separate limits of what the checks show.
Topic-specific state model. Linux Software & Source covers obtaining, building, linking and running software from source or source-controlled inputs while keeping source revision, toolchain, dependencies, produced artifacts and runtime behavior as separate limits of what the checks show.
Interpretation rule. - Source present ≠ intended revision.
- Compiler success ≠ final link/install success.
- Built artifact exists ≠ runtime dependencies resolve.
- Program starts ≠ original functional workload passes.
Quick reference
Installing software on Linux, in order of preference for servers:
1. Distribution packages (dnf, apt) — security updates included.
2. Vendor repositories (Docker, PostgreSQL, Grafana) with signed packages.
3. Containers for applications with their own lifecycle.
4. Language package managers in isolated environments (pipx/venv, npm with lockfiles).
5. Building from source — only when necessary, installed under /usr/local or /opt, and tracked.
Untracked make install builds do not get security updates and conflict with packages; prefer building your own package (rpmbuild, dpkg-buildpackage, fpm).
Limits and how it fails
Primary failure point. A successful checkout, make invocation or compiler exit shows only one stage; the intended artifact and runtime behavior must be verified independently.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Software & Source owns Linux source/build/link/runtime-library concepts; Git collaboration belongs to Automation Git, package-managed installation belongs to Package Management.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Software & Source. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://git-scm.com/docs · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Software & Source operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Software & Source.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Linux Software & Source covers obtaining, building, linking and running software from source or source-controlled inputs while keeping source revision, toolchain, dependencies, produced artifacts and runtime behavior as separate proof boundaries. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin exact source/revision or recovery point → verify inputs/consistency → observe copy/build/link result → read back destination/artifact and metadata/dependencies → restore/run in intended environment → repeat original workload + regression check. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | source/revision → build instructions → toolchain → headers/dependencies → compile → link → artifact identity → install/runtime loader → workload verification | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | A successful checkout, make invocation or compiler exit proves only one stage; the intended artifact and runtime behavior must be verified independently. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux backup/source evidence can establish this proof path: source/revision → build instructions → toolchain → headers/dependencies → compile → link → artifact identity → install/runtime loader → workload verification | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove unobserved data, metadata, revisions, dependencies, consumers or time periods. A successful checkout, make invocation or compiler exit proves only one stage; the intended artifact and runtime behavior must be verified independently. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven backup/source/build boundary, capture adjacent identity/read-back/runtime evidence, make only the demonstrated persistent change, then repeat the original workload plus a regression check. | Continue to the next unresolved boundary while preserving the original test condition. |
Software & Source · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Software & Source |
|---|---|
| Topic path | Software & Source |
| Runtime state | Linux Software & Source covers obtaining, building, linking and running software from source or source-controlled inputs while keeping source revision, toolchain, dependencies, produced artifacts and runtime behavior as separate proof boundaries. |
| Fast checks | - Pin source origin/revision, build options, compiler/toolchain version and target architecture. - Start from a known build state and capture dependency/header discovery rather than assuming the host environment. - Identify the produced artifact and inspect its linked/shared-library requirements before installation. - Run the installed artifact in the intended runtime environment and repeat the original acceptance test. |
| Verification chain | source/revision → build instructions → toolchain → headers/dependencies → compile → link → artifact identity → install/runtime loader → workload verification Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. |
| Failure boundary | A successful checkout, make invocation or compiler exit proves only one stage; the intended artifact and runtime behavior must be verified independently. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |