Debian Codegraph @

man/systemd-getty-generator.xml

raw
1 <?xml version="1.0"?>
2 <!--*-nxml-*-->
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
5 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
6 <refentry id="systemd-getty-generator" xmlns:xi="http://www.w3.org/2001/XInclude">
7
8 <refentryinfo>
9 <title>systemd-getty-generator</title>
10 <productname>systemd</productname>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>systemd-getty-generator</refentrytitle>
15 <manvolnum>8</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>systemd-getty-generator</refname>
20 <refpurpose>Generator for enabling getty instances on the
21 console</refpurpose>
22 </refnamediv>
23
24 <refsynopsisdiv>
25 <para><filename>/usr/lib/systemd/system-generators/systemd-getty-generator</filename></para>
26 </refsynopsisdiv>
27
28 <refsect1>
29 <title>Description</title>
30
31 <para><filename>systemd-getty-generator</filename> is a generator that automatically instantiates
32 <filename>[email protected]</filename> on the kernel consoles, if they can function as ttys and are
33 not provided by the virtual console subsystem. It will also instantiate
34 <filename>[email protected]</filename> instances for virtualizer consoles, if execution in a
35 virtualized environment is detected. If execution in a container environment is detected, it will instead
36 enable <filename>console-getty.service</filename> for <filename>/dev/console</filename>, and
37 <filename>[email protected]</filename> instances for additional container pseudo TTYs as requested
38 by the container manager (see <ulink url="https://systemd.io/CONTAINER_INTERFACE"><filename>Container
39 Interface</filename></ulink>). This should ensure that the user is shown a login prompt at the right
40 place, regardless of which environment the system is started in. For example, it is sufficient to
41 redirect the kernel console with a kernel command line argument such as <varname>console=</varname> to
42 get both kernel messages and a getty prompt on a serial TTY. See <ulink
43 url="https://docs.kernel.org/admin-guide/kernel-parameters.html">The kernel's command-line
44 parameters</ulink> for more information on the <varname>console=</varname> kernel parameter.</para>
45
46 <para><filename>systemd-getty-generator</filename> implements
47 <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
48
49 <para>Further information about configuration of gettys can be
50 found in
51 <ulink url="https://0pointer.de/blog/projects/serial-console.html">systemd
52 for Administrators, Part XVI: Gettys on Serial Consoles (and
53 Elsewhere)</ulink>.</para>
54 </refsect1>
55
56 <refsect1>
57 <title>Kernel Command Line</title>
58
59 <para><filename>systemd-getty-generator</filename> understands the following
60 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>
61 parameters:</para>
62
63 <variablelist class='kernel-commandline-options'>
64 <varlistentry>
65 <term><varname>systemd.getty_auto=</varname></term>
66
67 <listitem>
68 <para>This kernel command line option may be used to control the execution mode of the generator.
69 Takes an optional boolean argument. Since v258, this also takes comma-separated list of special
70 values: <literal>credential</literal>, <literal>container</literal>, <literal>console</literal>,
71 and <literal>builtin</literal>.</para>
72
73 <para>When <literal>credential</literal> is specified, the two credentials
74 <varname>getty.ttys.serial</varname> and <varname>getty.ttys.container</varname> will be parsed.
75 See System Credentials section below for more details.</para>
76
77 <para>When <literal>container</literal> is specified, <filename>console-getty.service</filename>
78 and <filename>[email protected]</filename> will be enabled when the system is running in a
79 container. This option will be ignored when the system is not in a container.</para>
80
81 <para>When <literal>console</literal> is specified, <filename>[email protected]</filename> for
82 active kernel consoles will be enabled. This option will be ignored when the system is running in a
83 container.</para>
84
85 <para>When <literal>builtins</literal> is specified, <filename>[email protected]</filename> for
86 available virtualizer consoles will be enabled. This option will be ignored when the system is
87 running in a container.</para>
88
89 <para>When yes, the above four options will be enabled. When no, all options are disabled and no
90 service will be enabled. When the kernel command line option is specified without an argument,
91 defaults to yes. The generator is enabled by default, and a false value may be used to disable it.
92 </para>
93
94 <xi:include href="version-info.xml" xpointer="v250"/>
95 </listitem>
96 </varlistentry>
97 </variablelist>
98 </refsect1>
99
100 <refsect1>
101 <title>Environment</title>
102
103 <variablelist class='environment-variables'>
104 <varlistentry>
105 <term><varname>$SYSTEMD_GETTY_AUTO</varname></term>
106
107 <listitem>
108 <para>This environment variable may be used to control the execution mode of the generator.
109 Takes the same value as <varname>systemd.getty_auto=</varname> kernel command line option.</para>
110
111 <xi:include href="version-info.xml" xpointer="v250"/>
112 </listitem>
113 </varlistentry>
114 </variablelist>
115 </refsect1>
116
117 <refsect1>
118 <title>System Credentials</title>
119
120 <variablelist class='system-credentials'>
121 <varlistentry>
122 <term><varname>getty.auto</varname></term>
123
124 <listitem>
125 <para>The system credential may be used to control the execution mode of the generator.
126 Takes the same value as <varname>systemd.getty_auto=</varname> kernel command line option.</para>
127
128 <xi:include href="version-info.xml" xpointer="v258"/>
129 </listitem>
130 </varlistentry>
131
132 <varlistentry>
133 <term><varname>getty.ttys.serial</varname></term>
134 <term><varname>getty.ttys.container</varname></term>
135
136 <listitem><para>These system credentials may be used to spawn additional login prompts on selected
137 TTYs. The two credentials should contain a newline-separated list of TTY names to spawn instances of
138 <filename>[email protected]</filename> (in case of <varname>getty.ttys.serial</varname>) and
139 <filename>[email protected]</filename> (in case of <varname>getty.ttys.container</varname>)
140 on. Any lines starting with a <literal>#</literal> will be ignored.</para>
141
142 <xi:include href="version-info.xml" xpointer="v254"/></listitem>
143 </varlistentry>
144 </variablelist>
145 </refsect1>
146
147 <refsect1>
148 <title>See Also</title>
149 <para><simplelist type="inline">
150 <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
151 <member><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
152 <member><citerefentry><refentrytitle>systemd.system-credentials</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
153 <member><citerefentry project='man-pages'><refentrytitle>agetty</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
154 </simplelist></para>
155 </refsect1>
156
157 </refentry>