nix
A powerful package manager that makes package management reliable, reproducible, and declarative.nixis experimental and requires enabling experimental features. For a classic, stable interface, seetldr nix classic. Somenixsubcommands such asbuild,develop,flake,registry,profile,search,repl,store,edit,why-depends, etc. have their own usage documentation. More information: https://nixos.org/manual/nix.
-
Enable the
nixcommand:
mkdir -p ~/.config/nix; echo 'experimental-features = nix-command flakes' > ~/.config/nix/nix.conf -
Display help for the
nixsubcommand:
nix help {{subcommand}} -
Search for a package in nixpkgs via its name or description:
nix search nixpkgs {{search_term}} -
Start a shell with the specified packages from nixpkgs available:
nix shell {{nixpkgs#pkg1 nixpkgs#pkg2 nixpkgs#pkg3 ...}} -
Install some packages from nixpkgs permanently:
nix profile install {{nixpkgs#pkg1 nixpkgs#pkg2 nixpkgs#pkg3 ...}} -
Remove unused paths from Nix store to free up space:
nix store gc -
Start an interactive environment for evaluating Nix expressions:
nix repl
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.