Skip to content

Latest commit

 

History

History
61 lines (45 loc) · 2.1 KB

File metadata and controls

61 lines (45 loc) · 2.1 KB

Runtime Management

Managing a running system.

System and Service Management

NixOS's init system is systemd. A "unit" is some resource systemd manages: a daemon (service), a device, a mount point, etc. Each unit has a configuration file to tell systemd what to do with the resource and its dependencies. systemctl is the basic tool you use to introspect and control your box. For example

$ systemctl                    # status of active units
$ systemctl --failed           # list failed units
$ systemctl status unit        # detailed status and logs of unit

Besides the status command above, other common commands to control units are: start, stop, restart, enable, disable. For example you could

$ sudo systemctl restart some.service

There are common power management commands too such as suspend, hibernate, reboot, and poweroff:

$ sudo systemctl suspend
$ sudo systemctl reboot

Other basic tools that come with systemd are

Read more about systemd on the Arch wiki.

NixOS Containers

NixOS comes with light-weight OS virtualization that lets you run another NixOS instance at native speed inside a container. The NixOS manual has a guide to container creation and management.