Files
nixpkgs/nixos/doc/manual/preface.md
Aliaksandr e209c15678 nixos/doc: clarify that root commands need a login shell
`nix-channel` reads its channel list from $HOME/.nix-channels, so running
it through a non-login `sudo`/`su` keeps the caller's $HOME and operates
on the wrong user's channels (e.g. `nix-channel --list` prints nothing).

Add a login-shell prerequisite before the first root command in the
upgrading chapter, so the commands that follow work as written, and
rewrite the per-user channel note to lead with what a login shell does
before describing the mistake.

Trim the `#`-prompt note in the preface to a single sentence; the
login-shell details belong next to the commands that need them.

Closes #27172

Assisted-by: claude-code with claude-opus-5[1m]-high
2026-08-16 00:38:44 +03:00

987 B
Raw Permalink Blame History

Preface

This manual describes how to install, use and extend NixOS, a Linux distribution based on the purely functional package management system Nix, that is composed using modules and packages defined in the Nixpkgs project.

Additional information regarding the Nix package manager and the Nixpkgs project can be found in respectively the Nix manual and the Nixpkgs manual.

If you encounter problems, please report them on the Discourse, the Matrix room, or on the #nixos channel on Libera.Chat. Alternatively, consider contributing to this manual. Bugs should be reported in NixOS GitHub issue tracker.

::: {.note} Commands prefixed with # have to be run as root. :::