查看我的机器正在运行哪个版本的 NixOS 的命令?

mhe*_*rzl 2 version nixos

https://nixos.org/,我可以查看 NixOS 的最新版本。

有没有我可以运行的命令来查看我的机器上的版本?

rof*_*rol 7

$ nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 5.10.79, NixOS, 21.05.4116.46251a79f75 (Okapi)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.16`
 - channels(root): `"nixos-21.05.4116.46251a79f75"`
 - channels(roman): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
Run Code Online (Sandbox Code Playgroud)
  • host os显示系统版本
  • channels(root)显示更新后的频道版本
  • channels(roman)显示用户 roman 与主机不在不同的频道上

在此输入图像描述

来源https://dopp.sk/posts/NixOS_channels/