Multi-user installation (recommended)
Install Nix via the recommended multi-user installation:
$ sh <(curl -L https://nixos.org/nix/install) --daemon
We recommend the multi-user install if you are on Linux running systemd, with SELinux disabled and
you can authenticate with
Install Nix via the single-user installation:
$ sh <(curl -L https://nixos.org/nix/install) --no-daemon
Above command will perform a single-user installation of Nix, meaning
/nix is owned by the invoking user. You should run
this under your usual user account, not as
script will invoke
sudo to create
it doesn’t already exist.
Which type of installation should you choose?
This depends on your requirements, but here is a short list of reasons why we recommend multi-user installation:
- Better build isolation (and that is what Nix is all about)
- Better security (a build can not write somewhere in your home)
- Sharing builds between users
rootto run the daemon
- More involved installation (creation of
nixbld* users, installing a systemd unit, ...
- Harder to uninstall