MACHINE-INFO(5)
๐ MACHINE-INFO(5) โ the machine-info manual, bestie edition ๐
okay so real talk: this is the manual page for machine-info, aka the Local machine information file. it's a level-5 manual page in the machine-info section. buckle up, we're gonna read it together ๐ซถ
โจ NAME โจ
machine-info โ the Local machine information file. that's it, that's the name ๐
๐ SYNOPSIS ๐
/etc/machine-info
one path. one file. no cap.
๐ธ DESCRIPTION ๐ธ
okay so the /etc/machine-info file is where your machine keeps its metadata. it's giving "about me" page but for a computer โจ
the format? it's a newline-separated list of environment-like, shell-compatible variable assignments, and it just ignores comments and empty lines. you can source the config from shell scripts, but bestie, listen โ beyond mere variable assignments there are no shell features supported. the whole point is that applications can read this file without implementing a full shell-compatible execution engine. want the detailed rundown of the format? go read os-release(5), it explains it all ๐
so /etc/machine-info holds metadata about the machine that's set by the user or administrator. and here's the tea: the settings configured here have the highest precedence ๐. when something isn't set, appropriate values may be determined automatically based on info about the hardware or other configuration files. and it is thus completely fine for this file to not even be present. like, no file, no problem, we move ๐
oh and you can use hostnamectl(1) to change the settings of this file straight from the command line. iconic.
โจ OPTIONS โจ
these are the machine metadata parameters you may set using /etc/machine-info:
๐ฆ Machine Information ๐ฆ
PRETTY_HOSTNAME=โ a pretty, human-readable UTF-8 machine identifier string. it should contain a name like"Lennart's Laptop"which is useful to present to the user and does not suffer from the syntax limitations of internet domain names ๐. if possible, the internet hostname configured in/etc/hostnameshould be kept similar to this one. example: if this value is"Lennart's Computer"an Internet hostname of"lennarts-computer"might be a good choice. if this parameter is not set, an application should fall back to the Internet hostname for presentation purposes.ICON_NAME=โ an icon identifying this machine according to the XDG Icon Naming Specification[1] ๐. if this parameter is not set, an application should fall back to"computer"or a similar icon name.CHASSIS=โ the chassis type. currently, the following chassis types are defined:"desktop","laptop","convertible","server","tablet","handset","watch", and"embedded", plus the special chassis types"vm"and"container"for virtualized systems that lack an immediate physical chassis ๐ป๐ฑโ
ngl, most systems allow detection of the chassis type automatically (based on firmware information or suchlike). so this setting should only be used to override a misdetection, or to manually configure the chassis type where automatic detection is not available.
Added in version 197.
DEPLOYMENT=โ describes the system deployment environment. one of the following is suggested:"development","integration","staging","testing","production".
Added in version 216.
LOCATION=โ describes the system location if applicable and known. takes a human-friendly, free-form string ๐. this may be as generic as"Berlin, Germany"or as specific as"Left Rack, 2nd Shelf".
Added in version 216.
TAGS=โ a colon-separated list of tags attached to this machine. tags are short labels that may be used to classify and group machines for management purposes โ for example to identify the role a machine plays in a deployment ("webserver","database"), the fleet or organizational unit it belongs to, or any other administrator-defined attribute. example:"TAGS=webserver:frontend:berlin"๐ท๏ธ
each individual tag must be 1...255 characters long and may consist only of the ASCII alphanumeric characters, "-", "." and "=". the first character may not be "-", "." or "=", and the last character may not be "-" or "." (unless it takes the parameterized form, see below).
a tag may optionally be parameterized with a value, in the form "key=value". the first "=" separates the key from the value; any further "=" characters are part of the value. the key (the part before the first "=") follows the same restrictions as an unparameterized tag โ in particular it may not be empty and may not end in "-" or ".". the value (the part after the first "=") may be empty and is otherwise unrestricted within the allowed character set. example: "TAGS=role=webserver:env=production:berlin". the same key may not be assigned more than one distinct value: "role=webserver:role=database" is refused ๐ (but a key may coexist with the corresponding unparameterized tag, e.g. "role:role=webserver").
the configured tags may be matched against with the ConditionMachineTag= and AssertMachineTag= unit settings, see systemd.unit(5) for details. they may be queried and changed with the tags command of hostnamectl(1).
Added in version 261.
HARDWARE_VENDOR=โ specifies the hardware vendor. if unspecified, the hardware vendor set in DMI orhwdb(7)will be used.
Added in version 251.
HARDWARE_MODEL=โ specifies the hardware model. if unspecified, the hardware model set in DMI orhwdb(7)will be used.
Added in version 251.
HARDWARE_SKU=โ specifies the hardware SKU (Stock-Keeping Unit). if unspecified, the hardware SKU set in DMI will be used.
Added in version 258.
HARDWARE_VERSION=โ specifies the hardware version. if unspecified, the hardware version set in DMI will be used.
Added in version 258.
๐ Custom Fields ๐
operating system vendors and systemd administrators may extend the file format and introduce new fields โจ. it is highly recommended to prefix new fields with an OS-specific name in order to avoid name clashes. and applications reading this file must ignore unknown fields. periodt.
example: "_LOCAL_EMERGENCY_CONTACT="user@example.org"".
๐ EXAMPLE ๐
PRETTY_HOSTNAME="Lennart's Tablet"
ICON_NAME=computer-tablet
CHASSIS=tablet
DEPLOYMENT=production
TAGS=demo:berlin:role=webserver
look at her. a whole vibe. slay ๐
๐ฅ SEE ALSO ๐ฅ
systemd(1), os-release(5), hostname(5), machine-id(5), hostnamectl(1), systemd-hostnamed.service(8)
โญ NOTES โญ
- XDG Icon Naming Specification
https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
and that's the whole page bestie ๐ซถ this was systemd 262.1, MACHINE-INFO(5) โ go forth and name your laptop something cute ๐โจ๐
๐ฆ where this page comes from
- arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms