| 1 |
<?xml version='1.0'?> <!--*-nxml-*--> |
| 2 |
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
| 3 |
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> |
| 4 |
<!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
| 5 |
|
| 6 |
<refentry id="systemd-hostnamed.service" conditional='ENABLE_HOSTNAMED'> |
| 7 |
|
| 8 |
<refentryinfo> |
| 9 |
<title>systemd-hostnamed.service</title> |
| 10 |
<productname>systemd</productname> |
| 11 |
</refentryinfo> |
| 12 |
|
| 13 |
<refmeta> |
| 14 |
<refentrytitle>systemd-hostnamed.service</refentrytitle> |
| 15 |
<manvolnum>8</manvolnum> |
| 16 |
</refmeta> |
| 17 |
|
| 18 |
<refnamediv> |
| 19 |
<refname>systemd-hostnamed.service</refname> |
| 20 |
<refname>systemd-hostnamed</refname> |
| 21 |
<refpurpose>Daemon to control system hostname from programs</refpurpose> |
| 22 |
</refnamediv> |
| 23 |
|
| 24 |
<refsynopsisdiv> |
| 25 |
<para><filename>systemd-hostnamed.service</filename></para> |
| 26 |
<para><filename>/usr/lib/systemd/systemd-hostnamed</filename></para> |
| 27 |
</refsynopsisdiv> |
| 28 |
|
| 29 |
<refsect1> |
| 30 |
<title>Description</title> |
| 31 |
|
| 32 |
<para><filename>systemd-hostnamed.service</filename> is a system service that may be used to change the |
| 33 |
system's hostname and related machine metadata from user programs. It is automatically activated on |
| 34 |
request and terminates itself when unused.</para> |
| 35 |
|
| 36 |
<para>It currently offers access to five variables: |
| 37 |
<itemizedlist> |
| 38 |
<listitem><para>The current hostname (Example: <literal>dhcp-192-168-47-11</literal>)</para> |
| 39 |
</listitem> |
| 40 |
|
| 41 |
<listitem><para>The static (configured) hostname (Example: |
| 42 |
<literal>lennarts-computer</literal>)</para></listitem> |
| 43 |
|
| 44 |
<listitem><para>The pretty hostname (Example: <literal>Lennart's Computer</literal>)</para> |
| 45 |
</listitem> |
| 46 |
|
| 47 |
<listitem><para>A suitable icon name for the local host (Example: |
| 48 |
<literal>computer-laptop</literal>)</para></listitem> |
| 49 |
|
| 50 |
<listitem><para>A chassis type (Example: <literal>tablet</literal>)</para> |
| 51 |
</listitem> |
| 52 |
</itemizedlist></para> |
| 53 |
|
| 54 |
<para>The static hostname is stored in <filename>/etc/hostname</filename>, see |
| 55 |
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more |
| 56 |
information. The pretty hostname, chassis type, and icon name are stored in |
| 57 |
<filename>/etc/machine-info</filename>, see |
| 58 |
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> |
| 59 |
|
| 60 |
<para>The tool |
| 61 |
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> is a |
| 62 |
command line client to this service.</para> |
| 63 |
|
| 64 |
<para>See |
| 65 |
<citerefentry><refentrytitle>org.freedesktop.hostname1</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 66 |
and |
| 67 |
<citerefentry><refentrytitle>org.freedesktop.LogControl1</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 68 |
for a description of the D-Bus API.</para> |
| 69 |
</refsect1> |
| 70 |
|
| 71 |
<refsect1> |
| 72 |
<title>See Also</title> |
| 73 |
<para><simplelist type="inline"> |
| 74 |
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 75 |
<member><citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 76 |
<member><citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 77 |
<member><citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 78 |
<member><citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry></member> |
| 79 |
<member><citerefentry><refentrytitle>org.freedesktop.hostname1</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> |
| 80 |
</simplelist></para> |
| 81 |
</refsect1> |
| 82 |
|
| 83 |
</refentry> |