1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 11:41:15 +02:00
nix/doc/manual/source/quick-start.md
2025-03-05 16:35:55 -03:00

1.4 KiB

Quick Start

This chapter is for impatient people who don't like reading documentation. For more in-depth information you are kindly referred to subsequent chapters.

  1. Install Nix. We recommend that macOS users use Determinate.pkg. For Linux and Windows Subsystem for Linux (WSL) users:

    $ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
      sh -s -- install --determinate
    

    The install script will use sudo, so make sure you have sufficient rights.

    For other installation methods, see the detailed installation instructions.

  2. Run software without installing it permanently:

    $ nix-shell --packages cowsay lolcat
    

    This downloads the specified packages with all their dependencies, and drops you into a Bash shell where the commands provided by those packages are present. This will not affect your normal environment:

    [nix-shell:~]$ cowsay Hello, Nix! | lolcat
    

    Exiting the shell will make the programs disappear again:

    [nix-shell:~]$ exit
    $ lolcat
    lolcat: command not found
    
  3. Search for more packages on search.nixos.org to try them out.

  4. Free up storage space:

    $ nix-collect-garbage