2011-04-16 08:02:54 +08:00
|
|
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
2019-03-14 21:40:58 +08:00
|
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
2015-06-19 01:47:44 +08:00
|
|
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
2020-11-09 12:23:58 +08:00
|
|
|
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
2011-04-16 08:02:54 +08:00
|
|
|
|
2023-08-23 00:52:02 +08:00
|
|
|
<refentry id="machine-info" xmlns:xi="http://www.w3.org/2001/XInclude">
|
2015-02-04 10:14:13 +08:00
|
|
|
<refentryinfo>
|
|
|
|
<title>machine-info</title>
|
|
|
|
<productname>systemd</productname>
|
|
|
|
</refentryinfo>
|
|
|
|
|
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>machine-info</refentrytitle>
|
|
|
|
<manvolnum>5</manvolnum>
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>machine-info</refname>
|
|
|
|
<refpurpose>Local machine information file</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsynopsisdiv>
|
|
|
|
<para><filename>/etc/machine-info</filename></para>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
|
|
|
|
<para>The <filename>/etc/machine-info</filename> file contains
|
|
|
|
machine metadata.</para>
|
|
|
|
|
2022-01-07 23:38:18 +08:00
|
|
|
<para>The format of <filename>machine-info</filename> is a newline-separated list of environment-like
|
|
|
|
shell-compatible variable assignments, ignoring comments and empty lines. It is possible to source the
|
|
|
|
configuration from shell scripts, however, beyond mere variable assignments no shell features are
|
|
|
|
supported, allowing applications to read the file without implementing a shell compatible execution
|
|
|
|
engine. See
|
|
|
|
<citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry> for a
|
|
|
|
detailed description of the format.</para>
|
2015-02-04 10:14:13 +08:00
|
|
|
|
2021-03-01 17:08:28 +08:00
|
|
|
<para><filename>/etc/machine-info</filename> contains metadata about the machine that is set by the user
|
|
|
|
or administrator. The settings configured here have the highest precedence. When not set, appropriate
|
|
|
|
values may be determined automatically, based on the information about the hardware or other
|
|
|
|
configuration files. It is thus completely fine for this file to not be present.</para>
|
2015-02-04 10:14:13 +08:00
|
|
|
|
|
|
|
<para>You may use
|
|
|
|
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
|
|
|
to change the settings of this file from the command line.</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Options</title>
|
|
|
|
|
|
|
|
<para>The following machine metadata parameters may be set using
|
|
|
|
<filename>/etc/machine-info</filename>:</para>
|
|
|
|
|
2019-02-13 17:36:26 +08:00
|
|
|
<variablelist class='environment-variables'>
|
2015-02-04 10:14:13 +08:00
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><varname>PRETTY_HOSTNAME=</varname></term>
|
|
|
|
|
|
|
|
<listitem><para>A pretty human-readable UTF-8 machine
|
|
|
|
identifier string. This should contain a name like
|
|
|
|
<literal>Lennart's Laptop</literal> which is useful to present
|
|
|
|
to the user and does not suffer by the syntax limitations of
|
|
|
|
internet domain names. If possible, the internet hostname as
|
|
|
|
configured in <filename>/etc/hostname</filename> should be
|
|
|
|
kept similar to this one. Example: if this value is
|
|
|
|
<literal>Lennart's Computer</literal> an Internet hostname of
|
|
|
|
<literal>lennarts-computer</literal> might be a good choice.
|
|
|
|
If this parameter is not set, an application should fall back
|
2020-04-14 16:37:40 +08:00
|
|
|
to the Internet hostname for presentation
|
2015-02-04 10:14:13 +08:00
|
|
|
purposes.</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><varname>ICON_NAME=</varname></term>
|
|
|
|
|
|
|
|
<listitem><para>An icon identifying this machine according to
|
|
|
|
the <ulink
|
2022-06-28 18:00:47 +08:00
|
|
|
url="https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">XDG
|
2015-02-04 10:14:13 +08:00
|
|
|
Icon Naming Specification</ulink>. If this parameter is not
|
|
|
|
set, an application should fall back to
|
|
|
|
<literal>computer</literal> or a similar icon
|
|
|
|
name.</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><varname>CHASSIS=</varname></term>
|
|
|
|
|
|
|
|
<listitem><para>The chassis type. Currently, the following
|
|
|
|
chassis types are defined:
|
|
|
|
<literal>desktop</literal>,
|
|
|
|
<literal>laptop</literal>,
|
2017-02-28 18:54:52 +08:00
|
|
|
<literal>convertible</literal>,
|
2015-02-04 10:14:13 +08:00
|
|
|
<literal>server</literal>,
|
|
|
|
<literal>tablet</literal>,
|
|
|
|
<literal>handset</literal>,
|
|
|
|
<literal>watch</literal>, and
|
2014-08-03 13:11:12 +08:00
|
|
|
<literal>embedded</literal>,
|
2015-02-04 10:14:13 +08:00
|
|
|
as well as the special chassis types
|
|
|
|
<literal>vm</literal> and
|
|
|
|
<literal>container</literal> for
|
2021-03-01 17:08:28 +08:00
|
|
|
virtualized systems that lack an immediate physical chassis.</para>
|
|
|
|
|
|
|
|
<para>Note that most systems allow detection of the chassis type automatically (based on firmware
|
|
|
|
information or suchlike). This setting should only be used to override a misdetection or to manually
|
2023-08-23 00:52:36 +08:00
|
|
|
configure the chassis type where automatic detection is not available.</para>
|
|
|
|
|
|
|
|
<xi:include href="version-info.xml" xpointer="v197"/></listitem>
|
2015-02-04 10:14:13 +08:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><varname>DEPLOYMENT=</varname></term>
|
|
|
|
|
|
|
|
<listitem><para>Describes the system deployment environment.
|
|
|
|
One of the following is suggested:
|
|
|
|
<literal>development</literal>,
|
|
|
|
<literal>integration</literal>,
|
|
|
|
<literal>staging</literal>,
|
|
|
|
<literal>production</literal>.
|
2023-08-23 00:52:36 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<xi:include href="version-info.xml" xpointer="v216"/></listitem>
|
2015-02-04 10:14:13 +08:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><varname>LOCATION=</varname></term>
|
|
|
|
|
|
|
|
<listitem><para>Describes the system location if applicable
|
|
|
|
and known. Takes a human-friendly, free-form string. This may
|
|
|
|
be as generic as <literal>Berlin, Germany</literal> or as
|
|
|
|
specific as <literal>Left Rack, 2nd Shelf</literal>.
|
2023-08-23 00:52:36 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<xi:include href="version-info.xml" xpointer="v216"/></listitem>
|
2015-02-04 10:14:13 +08:00
|
|
|
</varlistentry>
|
2021-12-15 00:09:08 +08:00
|
|
|
|
2022-01-22 09:44:50 +08:00
|
|
|
<varlistentry>
|
2022-03-25 00:48:11 +08:00
|
|
|
<term><varname>HARDWARE_VENDOR=</varname></term>
|
2022-01-22 09:44:50 +08:00
|
|
|
|
2022-03-25 00:48:11 +08:00
|
|
|
<listitem><para>Specifies the hardware vendor. If unspecified, the hardware vendor set in DMI or
|
|
|
|
<citerefentry><refentrytitle>hwdb</refentrytitle><manvolnum>7</manvolnum></citerefentry> will be
|
2023-08-23 00:52:36 +08:00
|
|
|
used.</para>
|
|
|
|
|
|
|
|
<xi:include href="version-info.xml" xpointer="v251"/></listitem>
|
2022-01-22 09:44:50 +08:00
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2022-03-25 00:48:11 +08:00
|
|
|
<term><varname>HARDWARE_MODEL=</varname></term>
|
2022-01-22 09:44:50 +08:00
|
|
|
|
|
|
|
<listitem><para>Specifies the hardware model. If unspecified, the hardware model set in DMI or
|
2022-03-25 00:48:11 +08:00
|
|
|
<citerefentry><refentrytitle>hwdb</refentrytitle><manvolnum>7</manvolnum></citerefentry> will be
|
2023-08-23 00:52:36 +08:00
|
|
|
used.</para>
|
|
|
|
|
|
|
|
<xi:include href="version-info.xml" xpointer="v251"/></listitem>
|
2022-01-22 09:44:50 +08:00
|
|
|
</varlistentry>
|
2015-02-04 10:14:13 +08:00
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Example</title>
|
|
|
|
|
|
|
|
<programlisting>PRETTY_HOSTNAME="Lennart's Tablet"
|
2012-12-25 02:03:59 +08:00
|
|
|
ICON_NAME=computer-tablet
|
2014-07-09 05:26:05 +08:00
|
|
|
CHASSIS=tablet
|
|
|
|
DEPLOYMENT=production</programlisting>
|
2015-02-04 10:14:13 +08:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>See Also</title>
|
|
|
|
<para>
|
|
|
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
|
|
|
<citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
|
|
|
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
|
|
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
|
|
|
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
|
|
|
<citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2011-04-16 08:02:54 +08:00
|
|
|
|
|
|
|
</refentry>
|