···10101111<refnamediv>
1212 <refname><command>nixos-version</command></refname>
1313- <refpurpose>show the version of nixpkgs NixOS was built from</refpurpose>
1313+ <refpurpose>show the NixOS version</refpurpose>
1414</refnamediv>
15151616<refsynopsisdiv>
···23232424<refsection><title>Description</title>
25252626-<para>This command describes the version of nixpkgs used to build
2727-NixOS.</para>
2626+<para>This command shows the version of the currently active NixOS
2727+configuration. For example:
28282929-<para>By default the output includes:</para>
2929+<screen>$ nixos-version
3030+16.03.1011.6317da4 (Emu)
3131+</screen>
3232+3333+The version consists of the following elements:
30343131-<itemizedlist>
3232- <listitem><para>The NixOS release</para></listitem>
3333- <listitem><para>Number of commits since the release</para></listitem>
3434- <listitem><para>Git SHA of the released commit</para></listitem>
3535- <listitem><para>Codename of the NixOS release</para></listitem>
3636-</itemizedlist>
3737-</refsection>
3535+<variablelist>
38363939-<refsection><title>Example</title>
3737+ <varlistentry>
3838+ <term><literal>16.03</literal></term>
3939+ <listitem><para>The NixOS release, indicating the year and month
4040+ in which it was released (e.g. March 2016).</para></listitem>
4141+ </varlistentry>
4242+4343+ <varlistentry>
4444+ <term><literal>1011</literal></term>
4545+ <listitem><para>The number of commits in the Nixpkgs Git
4646+ repository between the start of the release branch and the commit
4747+ from which this version was built. This ensures that NixOS
4848+ versions are monotonically increasing. It is
4949+ <literal>git</literal> when the current NixOS configuration was
5050+ built from a checkout of the Nixpkgs Git repository rather than
5151+ from a NixOS channel.</para></listitem>
5252+ </varlistentry>
5353+5454+ <varlistentry>
5555+ <term><literal>6317da4</literal></term>
5656+ <listitem><para>The first 7 characters of the commit in the
5757+ Nixpkgs Git repository from which this version was
5858+ built.</para></listitem>
5959+ </varlistentry>
6060+6161+ <varlistentry>
6262+ <term><literal>Emu</literal></term>
6363+ <listitem><para>The code name of the NixOS release. The first
6464+ letter of the code name indicates that this is the N'th stable
6565+ NixOS release; for example, Emu is the fifth
6666+ release.</para></listitem>
6767+ </varlistentry>
40684141-<para>Here is an example output, and corresponding information:
4242-<screen>$ nixos-version
4343-16.03.1011.6317da4 (Emu)
4444-</screen>
4545-</para>
6969+</variablelist>
46704747-<informaltable>
4848- <tgroup cols="2">
4949- <thead>
5050- <row>
5151- <entry>Attribute</entry>
5252- <entry>Value</entry>
5353- </row>
5454- </thead>
5555- <tbody>
5656- <row>
5757- <entry>NixOS Release</entry>
5858- <entry><literal>16.03</literal></entry>
5959- </row>
6060- <row>
6161- <entry>Commit Count</entry>
6262- <entry><literal>1011</literal></entry>
6363- </row>
6464- <row>
6565- <entry>Commit SHA</entry>
6666- <entry><literal>6317da4</literal></entry>
6767- </row>
6868- <row>
6969- <entry>Release Codename</entry>
7070- <entry><literal>Emu</literal></entry>
7171- </row>
7272- </tbody>
7373- </tgroup>
7474-</informaltable>
7575-<para>
7671</para>
7777-78727973</refsection>
8074···8983 <term><option>--hash</option></term>
9084 <term><option>--revision</option></term>
9185 <listitem>
9292- <para>The output will be the full hash of the git commit
8686+ <para>Show the full SHA1 hash of the Git commit from which this
8787+ configuration was built, e.g.
9388<screen>$ nixos-version --hash
94896317da40006f6bc2480c6781999c52d88dde2acf
9590</screen>