nix
package manager CLI
TLDR
SYNOPSIS
nix [command] [options]
DESCRIPTION
nix is the unified Nix package manager CLI providing reproducible package management, builds, and development environments. It is the modern replacement for older commands like nix-env and nix-build.The tool uses flakes for reproducible project definitions with lock files. Flakes standardize how Nix projects declare dependencies and outputs.nix develop creates development shells with project dependencies. nix run builds and executes packages directly. nix shell provides a temporary shell with specified packages available.The Nix store holds all packages in isolation, enabling atomic upgrades and rollbacks. Garbage collection with nix store gc removes unused paths.
PARAMETERS
search flakeref query
Search packages in a flake.run installable
Build and run a package.build [installable]
Build a derivation or fetch a store path.develop [installable]
Enter a development shell from a flake.shell installable...
Run a shell with specified packages available.flake subcommand
Manage Nix flakes (show, update, init, check, lock).profile subcommand
Manage Nix profiles (install, remove, list, upgrade).store subcommand
Manage the Nix store (gc, verify, repair, optimise).repl
Start an interactive Nix expression evaluator.eval installable
Evaluate a Nix expression.--help
Display help information.--version
Display version information.
CAVEATS
Steep learning curve. The Nix expression language is functional and unique. Many new-style nix commands are still marked as experimental and require enabling experimental features. Requires Nix daemon installation.
HISTORY
Nix was created by Eelco Dolstra as his PhD thesis project at Utrecht University, first released in 2003. The unified nix CLI was introduced in Nix 2.0.
SEE ALSO
nix-shell(1), nix-env(1), nix-build(1), nix-store(1), nixos-rebuild(1), home-manager(1)
