nixos-rebuild Command Examples

Reconfigure a NixOS machine. More information: https://nixos.org/nixos/manual/#sec-changing-config.

sudo nixos-rebuild switch

sudo nixos-rebuild switch -p {{name}}

sudo nixos-rebuild switch --upgrade

sudo nixos-rebuild switch --rollback

sudo nixos-rebuild boot

sudo nixos-rebuild test

sudo nixos-rebuild build-vm