What is Guix?

Free preview from Guix Essentials.

The Problem with Traditional Linux Systems

If you've used Linux for a while, you've probably experienced some of these frustrations:

  • You installed a package months ago, but you can't remember why or what depends on it
  • An update broke something, and you're not sure which package caused it or how to go back to the previous version
  • You want to set up a new machine exactly like your current one, but it takes hours of manual tweaking
  • You tried to help a friend with their Linux setup, but things don't quite work the same as they do on your machine
  • Configuration files are scattered across /etc, your home directory, and who knows where else

These problems share a common root: traditional package managers treat your system as something to be changed over time. Each apt install or dnf update changes your system in place, and the history of those changes is mostly lost.

A Different Approach

Guix takes a fundamentally different approach. Instead of changing your system in place, Guix builds a new system each time you make a change, keeping the old one around in case you need it.

This might sound wasteful, but it's actually quite efficient (I'll explain why later). More importantly, it gives you something invaluable: the ability to describe your entire system in code and reproduce it exactly.

Here's what that looks like in practice:

(operating-system
  (host-name "my-computer")
  (timezone "Europe/Athens")

  (packages
    (list emacs git ungoogled-chromium))

  (services
    (list (service openssh-service-type))))

This isn't pseudocode. It's real Guix configuration syntax. A complete configuration needs a bit more (bootloader, file systems), but this shows the core idea: you declare what you want, and Guix builds it.

Two Key Ideas

Guix is built on two powerful ideas that work together:

Declarative Configuration

Instead of running a sequence of commands to set up your system, you declare what you want the end result to be. Guix figures out how to get you there.

Think of the difference between:

Imperative (traditional):

apt update
apt install emacs
apt install git
systemctl enable ssh
# ... hope you remember all the steps

Declarative (Guix):

This is my system. It has Emacs, Git, and SSH enabled.

With the declarative approach, your configuration file is the documentation. Anyone can look at it and understand what you've installed and how the system is configured.

Immutability

When Guix builds a package or system, the result is immutable: it cannot be changed after it's created. If you want a different version, Guix builds a new one and keeps the old one around.

This sounds like a limitation, and also somewhat wasteful, but it's actually what makes everything else possible:

  • Rollback: Made a change that broke something? Switch back to the previous version instantly.
  • Reproducibility: The same inputs always produce the same outputs. Your system today will be identical to the same configuration built next year.
  • Atomic upgrades: Updates either succeed completely or don't happen at all. No more half-updated broken systems.
  • Safe experimentation: Try new packages or configurations knowing you can always go back. You can even test entire system configurations inside virtual machines (using guix system vm) before applying them to your real machine.

What "Guix" Actually Is

Before we go further, let me clarify something. The word "Guix" actually refers to a few different things depending on how you use it:

  • Guix the package manager: A tool for installing packages, available on any Linux distribution
  • Guix System: A complete Linux distribution built around the Guix package manager
  • Guix Home: A way to manage your user-level configuration (dotfiles, software, user services) with the same declarative approach

In this course, we're focused on Guix System, using Guix to manage your entire operating system. However, the concepts you'll learn apply to all three, and even to deploying and managing servers with Guix, something we will cover in a later course.

What's Next

Now that you have a sense of what makes Guix different, let's look at a complete example configuration. Seeing the big picture first will make the individual concepts easier to understand when we dig into them.

This is one of 21 lessons in Guix Essentials.

The full course takes you from a curious first install all the way to running a configured Guix system day to day, with working examples you can follow along with.

Get the full course →
Get the System Crafters Newsletter
Updates on open source tools, tutorials, and community projects. We'll also occasionally let you know about new courses and resources.
Name (optional)
Email Address