You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

man-nixos-version.xml 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <refentry xmlns="http://docbook.org/ns/docbook"
  2. xmlns:xlink="http://www.w3.org/1999/xlink"
  3. xmlns:xi="http://www.w3.org/2001/XInclude">
  4. <refmeta>
  5. <refentrytitle><command>nixos-version</command>
  6. </refentrytitle><manvolnum>8</manvolnum>
  7. <refmiscinfo class="source">NixOS</refmiscinfo>
  8. </refmeta>
  9. <refnamediv>
  10. <refname><command>nixos-version</command></refname>
  11. <refpurpose>show the NixOS version</refpurpose>
  12. </refnamediv>
  13. <refsynopsisdiv>
  14. <cmdsynopsis>
  15. <command>nixos-version</command>
  16. <arg>
  17. <option>--hash</option>
  18. </arg>
  19. <arg>
  20. <option>--revision</option>
  21. </arg>
  22. </cmdsynopsis>
  23. </refsynopsisdiv>
  24. <refsection>
  25. <title>Description</title>
  26. <para>
  27. This command shows the version of the currently active NixOS configuration.
  28. For example:
  29. <screen>$ nixos-version
  30. 16.03.1011.6317da4 (Emu)
  31. </screen>
  32. The version consists of the following elements:
  33. <variablelist>
  34. <varlistentry>
  35. <term>
  36. <literal>16.03</literal>
  37. </term>
  38. <listitem>
  39. <para>
  40. The NixOS release, indicating the year and month in which it was
  41. released (e.g. March 2016).
  42. </para>
  43. </listitem>
  44. </varlistentry>
  45. <varlistentry>
  46. <term>
  47. <literal>1011</literal>
  48. </term>
  49. <listitem>
  50. <para>
  51. The number of commits in the Nixpkgs Git repository between the start of
  52. the release branch and the commit from which this version was built.
  53. This ensures that NixOS versions are monotonically increasing. It is
  54. <literal>git</literal> when the current NixOS configuration was built
  55. from a checkout of the Nixpkgs Git repository rather than from a NixOS
  56. channel.
  57. </para>
  58. </listitem>
  59. </varlistentry>
  60. <varlistentry>
  61. <term>
  62. <literal>6317da4</literal>
  63. </term>
  64. <listitem>
  65. <para>
  66. The first 7 characters of the commit in the Nixpkgs Git repository from
  67. which this version was built.
  68. </para>
  69. </listitem>
  70. </varlistentry>
  71. <varlistentry>
  72. <term>
  73. <literal>Emu</literal>
  74. </term>
  75. <listitem>
  76. <para>
  77. The code name of the NixOS release. The first letter of the code name
  78. indicates that this is the N'th stable NixOS release; for example, Emu
  79. is the fifth release.
  80. </para>
  81. </listitem>
  82. </varlistentry>
  83. </variablelist>
  84. </para>
  85. </refsection>
  86. <refsection>
  87. <title>Options</title>
  88. <para>
  89. This command accepts the following options:
  90. </para>
  91. <variablelist>
  92. <varlistentry>
  93. <term>
  94. <option>--hash</option>
  95. </term>
  96. <term>
  97. <option>--revision</option>
  98. </term>
  99. <listitem>
  100. <para>
  101. Show the full SHA1 hash of the Git commit from which this configuration
  102. was built, e.g.
  103. <screen>$ nixos-version --hash
  104. 6317da40006f6bc2480c6781999c52d88dde2acf
  105. </screen>
  106. </para>
  107. </listitem>
  108. </varlistentry>
  109. </variablelist>
  110. </refsection>
  111. </refentry>