]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/machine-info.xml
man: add version info
[thirdparty/systemd.git] / man / machine-info.xml
CommitLineData
7640a5de 1<?xml version='1.0'?> <!--*-nxml-*-->
3a54a157 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
12b42c76 3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
db9ecf05 4<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
7640a5de 5
4623eecb 6<refentry id="machine-info" xmlns:xi="http://www.w3.org/2001/XInclude">
798d3a52
ZJS
7 <refentryinfo>
8 <title>machine-info</title>
9 <productname>systemd</productname>
798d3a52
ZJS
10 </refentryinfo>
11
12 <refmeta>
13 <refentrytitle>machine-info</refentrytitle>
14 <manvolnum>5</manvolnum>
15 </refmeta>
16
17 <refnamediv>
18 <refname>machine-info</refname>
19 <refpurpose>Local machine information file</refpurpose>
20 </refnamediv>
21
22 <refsynopsisdiv>
23 <para><filename>/etc/machine-info</filename></para>
24 </refsynopsisdiv>
25
26 <refsect1>
27 <title>Description</title>
28
29 <para>The <filename>/etc/machine-info</filename> file contains
30 machine metadata.</para>
31
49fddcd3
ZJS
32 <para>The format of <filename>machine-info</filename> is a newline-separated list of environment-like
33 shell-compatible variable assignments, ignoring comments and empty lines. It is possible to source the
34 configuration from shell scripts, however, beyond mere variable assignments no shell features are
35 supported, allowing applications to read the file without implementing a shell compatible execution
36 engine. See
37 <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry> for a
38 detailed description of the format.</para>
798d3a52 39
dac05c08
ZJS
40 <para><filename>/etc/machine-info</filename> contains metadata about the machine that is set by the user
41 or administrator. The settings configured here have the highest precedence. When not set, appropriate
42 values may be determined automatically, based on the information about the hardware or other
43 configuration files. It is thus completely fine for this file to not be present.</para>
798d3a52
ZJS
44
45 <para>You may use
46 <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
47 to change the settings of this file from the command line.</para>
48 </refsect1>
49
50 <refsect1>
51 <title>Options</title>
52
53 <para>The following machine metadata parameters may be set using
54 <filename>/etc/machine-info</filename>:</para>
55
833fc980 56 <variablelist class='environment-variables'>
798d3a52
ZJS
57
58 <varlistentry>
59 <term><varname>PRETTY_HOSTNAME=</varname></term>
60
61 <listitem><para>A pretty human-readable UTF-8 machine
62 identifier string. This should contain a name like
63 <literal>Lennart's Laptop</literal> which is useful to present
64 to the user and does not suffer by the syntax limitations of
65 internet domain names. If possible, the internet hostname as
66 configured in <filename>/etc/hostname</filename> should be
67 kept similar to this one. Example: if this value is
68 <literal>Lennart's Computer</literal> an Internet hostname of
69 <literal>lennarts-computer</literal> might be a good choice.
70 If this parameter is not set, an application should fall back
38b38500 71 to the Internet hostname for presentation
798d3a52
ZJS
72 purposes.</para></listitem>
73 </varlistentry>
74
75 <varlistentry>
76 <term><varname>ICON_NAME=</varname></term>
77
78 <listitem><para>An icon identifying this machine according to
79 the <ulink
41d6f3bf 80 url="https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">XDG
798d3a52
ZJS
81 Icon Naming Specification</ulink>. If this parameter is not
82 set, an application should fall back to
83 <literal>computer</literal> or a similar icon
84 name.</para></listitem>
85 </varlistentry>
86
87 <varlistentry>
88 <term><varname>CHASSIS=</varname></term>
89
90 <listitem><para>The chassis type. Currently, the following
91 chassis types are defined:
92 <literal>desktop</literal>,
93 <literal>laptop</literal>,
34b52450 94 <literal>convertible</literal>,
798d3a52
ZJS
95 <literal>server</literal>,
96 <literal>tablet</literal>,
97 <literal>handset</literal>,
98 <literal>watch</literal>, and
b938cb90 99 <literal>embedded</literal>,
798d3a52
ZJS
100 as well as the special chassis types
101 <literal>vm</literal> and
102 <literal>container</literal> for
dac05c08
ZJS
103 virtualized systems that lack an immediate physical chassis.</para>
104
105 <para>Note that most systems allow detection of the chassis type automatically (based on firmware
106 information or suchlike). This setting should only be used to override a misdetection or to manually
ec07c3c8
AK
107 configure the chassis type where automatic detection is not available.</para>
108
109 <xi:include href="version-info.xml" xpointer="v197"/></listitem>
798d3a52
ZJS
110 </varlistentry>
111
112 <varlistentry>
113 <term><varname>DEPLOYMENT=</varname></term>
114
115 <listitem><para>Describes the system deployment environment.
116 One of the following is suggested:
117 <literal>development</literal>,
118 <literal>integration</literal>,
119 <literal>staging</literal>,
120 <literal>production</literal>.
ec07c3c8
AK
121 </para>
122
123 <xi:include href="version-info.xml" xpointer="v216"/></listitem>
798d3a52
ZJS
124 </varlistentry>
125
126 <varlistentry>
127 <term><varname>LOCATION=</varname></term>
128
129 <listitem><para>Describes the system location if applicable
130 and known. Takes a human-friendly, free-form string. This may
131 be as generic as <literal>Berlin, Germany</literal> or as
132 specific as <literal>Left Rack, 2nd Shelf</literal>.
ec07c3c8
AK
133 </para>
134
135 <xi:include href="version-info.xml" xpointer="v216"/></listitem>
798d3a52 136 </varlistentry>
357376d0 137
4fc7e4f3 138 <varlistentry>
0924ea2b 139 <term><varname>HARDWARE_VENDOR=</varname></term>
4fc7e4f3 140
0924ea2b
LP
141 <listitem><para>Specifies the hardware vendor. If unspecified, the hardware vendor set in DMI or
142 <citerefentry><refentrytitle>hwdb</refentrytitle><manvolnum>7</manvolnum></citerefentry> will be
ec07c3c8
AK
143 used.</para>
144
145 <xi:include href="version-info.xml" xpointer="v251"/></listitem>
4fc7e4f3
YW
146 </varlistentry>
147
148 <varlistentry>
0924ea2b 149 <term><varname>HARDWARE_MODEL=</varname></term>
4fc7e4f3
YW
150
151 <listitem><para>Specifies the hardware model. If unspecified, the hardware model set in DMI or
0924ea2b 152 <citerefentry><refentrytitle>hwdb</refentrytitle><manvolnum>7</manvolnum></citerefentry> will be
ec07c3c8
AK
153 used.</para>
154
155 <xi:include href="version-info.xml" xpointer="v251"/></listitem>
4fc7e4f3 156 </varlistentry>
798d3a52
ZJS
157 </variablelist>
158 </refsect1>
159
160 <refsect1>
161 <title>Example</title>
162
163 <programlisting>PRETTY_HOSTNAME="Lennart's Tablet"
7871c8e9 164ICON_NAME=computer-tablet
799298d6
JG
165CHASSIS=tablet
166DEPLOYMENT=production</programlisting>
798d3a52
ZJS
167 </refsect1>
168
169 <refsect1>
170 <title>See Also</title>
171 <para>
172 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
173 <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
174 <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
175 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
176 <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
177 <citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
178 </para>
179 </refsect1>
7640a5de
LP
180
181</refentry>