GNU Guix is a functional package manager and the basis of a Linux distribution, Guix System, in which every package is a pure build recipe whose output is stored under a path derived from a cryptographic hash of all its inputs. In Linux package management, it belongs to the same family as Nix: installing, upgrading and removing software are transactional operations that never overwrite files in place, so any previous state can be restored with a single rollback.
Guix is written and configured in GNU Guile, a dialect of Scheme, which means package definitions, user manifests and whole operating system declarations are ordinary programs. It can run as a standalone distribution or on top of an existing system such as Debian or Fedora, next to APT or DNF, without interfering with them.
How GNU Guix builds and stores packages
Guix treats a package build as a mathematical function: the same source code, dependencies, build script and options always produce the same output. Each result is written to the read-only store at /gnu/store, in a directory such as /gnu/store/<hash>-hello-2.12, where the hash covers every input of the build, including the compiler and the C library.
Builds are performed by guix-daemon, a privileged service that runs each job in an isolated build container with a dedicated build user, no network access and only the declared inputs visible. This isolation removes undeclared dependencies, the most common cause of builds that work on one machine and fail on another. Users never write to the store directly; they ask the daemon, which is why unprivileged users can install software safely.
The main building blocks of the system are summarized below.
| Component | Role | Practical consequence |
|---|---|---|
| Store | Holds every built package under a hashed path | Many versions coexist without conflicts |
| Daemon | Performs isolated builds and store writes | Builds are repeatable and safe for multiple users |
| Profile | Set of symbolic links to store items | Each user sees only the packages chosen |
| Generation | Numbered snapshot of a profile | Rollback is a pointer switch, not a reinstall |
| Channel | Git repository of package definitions | The package collection is versioned like code |
| Substitute | Prebuilt binary for a known store path | Downloads replace local compilation when trusted |
Profiles, generations and rollbacks
A profile is a directory tree of symbolic links that point into the store, and the shell finds programs through it via PATH. When a user runs guix install, Guix builds a new profile generation next to the old one and then switches a single link atomically. If the operation is interrupted, the previous generation remains intact, so the system is never left half-upgraded.
The command guix package --roll-back returns to the preceding generation, and guix package --list-generations shows the full history. Guix System applies the same idea to the whole operating system: each guix system reconfigure creates a bootable system generation, and older generations appear in the boot menu as a recovery path.
Old generations keep their store items alive. Running guix gc removes items that no generation references, so disk usage grows until generations are deleted and garbage collection is run.
Channels, substitutes and reproducibility
The package collection arrives through channels, which are Git repositories of Scheme definitions. The command guix pull updates the channels and the Guix tool itself, and guix describe prints the exact channel commits in use. Recording that output allows guix time-machine to recreate the same package set months or years later, a property valued in scientific computing and research software.
Compiling everything locally would be slow, so Guix fetches substitutes, prebuilt binaries from build farms whose signing keys the administrator has authorized. Because the store path depends only on inputs, a substitute is interchangeable with a local build. The command guix challenge compares local results with substitute servers to detect non-reproducible or tampered builds.
Guix also pursues a full-source bootstrap: the toolchain is built from a very small auditable binary seed rather than from large opaque compiler binaries. This reduces the risk of a trusting-trust attack, in which a compromised compiler silently infects everything built with it.
The following commands cover most daily work.
| Command | Purpose | Typical use |
|---|---|---|
guix install | Add packages to the user profile | Install an editor without root |
guix pull | Update channels and the Guix tool | Fetch new package versions |
guix upgrade | Rebuild the profile with newer versions | Routine updates |
guix shell | Start a temporary environment | Project dependencies without installing |
guix time-machine | Run Guix at a recorded channel state | Reproduce an old experiment |
guix pack | Export a closure as tarball or Docker image | Deploy to machines without Guix |
guix system reconfigure | Apply an operating system declaration | Change services on Guix System |
How GNU Guix compares with related package managers
Guix differs from traditional Linux package managers mainly in where files live and how state changes. Tools such as dpkg, RPM and Pacman install into shared directories like /usr, so only one version of a library can normally exist at a time, and an upgrade modifies the running system in place.
| Tool | Model | Rollback | Configuration language |
|---|---|---|---|
| GNU Guix | Functional, hashed store | Built in, per profile and system | Guile Scheme |
| Nix | Functional, hashed store | Built in, per profile and system | Nix expression language |
| APT with dpkg | Shared file system tree | Not native; needs snapshots | Control files and shell scripts |
| DNF with RPM | Shared file system tree | Transaction history, limited | Spec files |
| Flatpak | Sandboxed desktop applications | Per application commit | JSON or YAML manifests |
Guix and Nix share the same store model and historically the same daemon design, but they differ in philosophy. Guix uses a general-purpose programming language instead of a domain-specific one, and its official channel accepts only free software under the GNU Free System Distribution Guidelines. Proprietary firmware and drivers are available only through third-party channels, which matters on hardware that needs nonfree wireless firmware.
Practical use and configuration choices
Most adopters start with Guix as a foreign-distribution installation to manage development tools or research software, and only later consider Guix System for whole machines. Declarative manifest files describe a profile as code and can be stored in version control next to the project they serve.
| Situation | Recommended approach | Reason |
|---|---|---|
| Shared server with many users | Guix on a foreign distribution | Users install software without root |
| Reproducible research pipeline | Manifest plus pinned channels | Time-machine recreates exact versions |
| Whole-machine declarative setup | Guix System | Services and users declared in one file |
| Target hosts without Guix | `guix pack` output | Ships a self-contained closure |
| Hardware needing nonfree firmware | Third-party channel or other distribution | Official channel excludes nonfree code |
Limitations and common mistakes
Guix trades simplicity of the file system layout for strong guarantees, and several issues follow from that design.
- Disk usage grows quickly, because every generation keeps its own dependencies until
guix gcruns. - `guix pull` can be slow, since it compiles channel code; on small machines it may take many minutes.
- Missing substitutes force local builds, which can mean hours for large packages such as browsers.
- Software assuming `/usr/lib` paths may fail;
guix shell --container --emulate-fhshelps in such cases. - Forgetting environment variables after installation leaves new programs invisible until the profile is sourced again.
- Grafts apply urgent security fixes without full rebuilds, but they add processing time to some operations.
In simple terms
GNU Guix is a way to install software on Linux that never throws away the previous setup. Every program is kept in its own labeled box, and the label is calculated from everything used to make it. Two versions of the same program can therefore sit side by side without clashing.
When you install or upgrade something, Guix prepares a new arrangement of boxes and switches to it in one step. If the new arrangement causes trouble, you simply switch back to the old one. It works much like an undo button for your whole software collection.
A practical example
A bioinformatics group runs a genome analysis pipeline on a shared university cluster where researchers have no root access. The administrator installs Guix once, and each researcher keeps a manifest file listing tools such as Python, R and several aligners in the same Git repository as the analysis scripts.
Before submitting a paper, the team runs guix describe and stores the exact channel commits with the manifest. Eighteen months later, a reviewer asks for a rerun on new data. Using guix time-machine with the recorded commits, a new student rebuilds the identical software environment, mostly from substitutes, in under an hour. The results match the original figures, and the group avoids weeks of reconstructing library versions by hand.