Home Explore Blog CI



nix

doc/manual/source/installation/single-user.md
f9c1b9f5fc0560ec7ebe744c0403226b9b01cb5b5b818b4300000003000001e4
# Single-User Mode

In single-user mode, all Nix operations that access the database in
`prefix/var/nix/db` or modify the Nix store in `prefix/store` must be
performed under the user ID that owns those directories. This is
typically root. (If you install from RPM packages, that’s in fact the
default ownership.) However, on single-user machines, it is often
convenient to `chown` those directories to your normal user account so
that you don’t have to `su` to root all the time.

Chunks
97898c41 (1st chunk of `doc/manual/source/installation/single-user.md`)
Title: Single-User Mode and Ownership of Nix Directories
Summary
In single-user mode, Nix operations accessing `prefix/var/nix/db` or modifying `prefix/store` must be performed under the user ID owning those directories, typically root (default for RPM installs). For convenience on single-user machines, users often `chown` these directories to their normal account, avoiding constant `su` to root. This allows direct Nix management without elevated privileges, streamlining the process. Consider security implications and ensure the user account is trusted before changing ownership.