]>
Commit | Line | Data |
---|---|---|
2da0d7c0 | 1 | .TH AGETTY 8 "February 2016" "util-linux" "System Administration" |
6dbe3af9 KZ |
2 | .SH NAME |
3 | agetty \- alternative Linux getty | |
fd6b7a7f | 4 | |
6dbe3af9 | 5 | .SH SYNOPSIS |
4cfda3dc | 6 | .B agetty |
f49ccec2 BS |
7 | [options] |
8 | .IR port " [" baud_rate "...] [" term ] | |
fd6b7a7f | 9 | |
6dbe3af9 KZ |
10 | .SH DESCRIPTION |
11 | .ad | |
12 | .fi | |
fd6b7a7f | 13 | \fBagetty\fP opens a tty port, prompts for a login name and invokes |
f61a7d1f | 14 | the /bin/login command. It is normally invoked by \fBinit\fP(8). |
6dbe3af9 | 15 | |
fd6b7a7f | 16 | \fBagetty\fP has several \fInon-standard\fP features that are useful |
f61a7d1f | 17 | for hardwired and for dial-in lines: |
12e45a05 | 18 | .IP \(bu |
6dbe3af9 KZ |
19 | Adapts the tty settings to parity bits and to erase, kill, |
20 | end-of-line and uppercase characters when it reads a login name. | |
21 | The program can handle 7-bit characters with even, odd, none or space | |
2da0d7c0 | 22 | parity, and 8-bit characters with no parity. The following special |
5676f365 | 23 | characters are recognized: Control-U (kill); DEL and |
f61a7d1f | 24 | backspace (erase); carriage return and line feed (end of line). |
b06c1ca6 | 25 | See also the \fB\-\-erase\-chars\fP and \fB\-\-kill\-chars\fP options. |
12e45a05 | 26 | .IP \(bu |
6dbe3af9 KZ |
27 | Optionally deduces the baud rate from the CONNECT messages produced by |
28 | Hayes(tm)-compatible modems. | |
12e45a05 | 29 | .IP \(bu |
6dbe3af9 KZ |
30 | Optionally does not hang up when it is given an already opened line |
31 | (useful for call-back applications). | |
12e45a05 | 32 | .IP \(bu |
fd6b7a7f | 33 | Optionally does not display the contents of the \fI/etc/issue\fP file. |
12e45a05 | 34 | .IP \(bu |
1fc82a13 | 35 | Optionally displays an alternative issue file or directory instead of \fI/etc/issue\fP or \fI/etc/issue.d\fP. |
12e45a05 | 36 | .IP \(bu |
fd6b7a7f | 37 | Optionally does not ask for a login name. |
12e45a05 | 38 | .IP \(bu |
6dbe3af9 KZ |
39 | Optionally invokes a non-standard login program instead of |
40 | \fI/bin/login\fP. | |
12e45a05 | 41 | .IP \(bu |
2da0d7c0 | 42 | Optionally turns on hardware flow control. |
12e45a05 | 43 | .IP \(bu |
6dbe3af9 KZ |
44 | Optionally forces the line to be local with no need for carrier detect. |
45 | .PP | |
46 | This program does not use the \fI/etc/gettydefs\fP (System V) or | |
47 | \fI/etc/gettytab\fP (SunOS 4) files. | |
48 | .SH ARGUMENTS | |
49 | .na | |
50 | .nf | |
51 | .fi | |
52 | .ad | |
53 | .TP | |
2da0d7c0 BS |
54 | .I port |
55 | A path name relative to the \fI/dev\fP directory. If a "\-" is | |
fd6b7a7f | 56 | specified, \fBagetty\fP assumes that its standard input is |
6dbe3af9 KZ |
57 | already connected to a tty port and that a connection to a |
58 | remote user has already been established. | |
59 | .sp | |
e85281a8 DWF |
60 | Under System V, a "\-" \fIport\fP argument should be preceded |
61 | by a "\-\-". | |
6dbe3af9 | 62 | .TP |
2da0d7c0 BS |
63 | .IR baud_rate ,... |
64 | A comma-separated list of one or more baud rates. Each time | |
fd6b7a7f | 65 | \fBagetty\fP receives a BREAK character it advances through |
6dbe3af9 KZ |
66 | the list, which is treated as if it were circular. |
67 | .sp | |
68 | Baud rates should be specified in descending order, so that the | |
f61a7d1f | 69 | null character (Ctrl\-@) can also be used for baud-rate switching. |
4cfda3dc | 70 | .sp |
914047b4 KZ |
71 | This argument is optional and unnecessary for \fBvirtual terminals\fP. |
72 | .sp | |
73 | The default for \fBserial terminals\fP is keep the current baud rate | |
b06c1ca6 | 74 | (see \fB\-\-keep\-baud\fP) and if unsuccessful then default to '9600'. |
6dbe3af9 | 75 | .TP |
2da0d7c0 BS |
76 | .I term |
77 | The value to be used for the TERM environment variable. This overrides | |
6dbe3af9 | 78 | whatever init(8) may have set, and is inherited by login and the shell. |
4cfda3dc | 79 | .sp |
f61a7d1f BS |
80 | The default is 'vt100', or 'linux' for Linux on a virtual terminal, |
81 | or 'hurd' for GNU Hurd on a virtual terminal. | |
6dbe3af9 KZ |
82 | .SH OPTIONS |
83 | .na | |
84 | .nf | |
85 | .fi | |
86 | .ad | |
87 | .TP | |
e9980cf8 SK |
88 | \-8, \-\-8bits |
89 | Assume that the tty is 8-bit clean, hence disable parity detection. | |
90 | .TP | |
eb8e1f9f | 91 | \-a, \-\-autologin \fIusername\fP |
dddbfa4e WP |
92 | Automatically log in the specified user without asking for a username or password. |
93 | Using this option causes an \fB\-f \fIusername\fR option and argument to be | |
94 | added to the \fB/bin/login\fP command line. See \fB\-\-login\-options\fR, which | |
95 | can be used to modify this option's behavior. | |
2c4d86ab KZ |
96 | |
97 | Note that \fB\-\-autologin\fP may affect the way how agetty initializes the | |
98 | serial line, because on auto-login agetty does not read from the line and it | |
99 | has no opportunity optimize the line setting. | |
eb8e1f9f | 100 | .TP |
e9980cf8 | 101 | \-c, \-\-noreset |
c9151874 | 102 | Do not reset terminal cflags (control modes). See \fBtermios\fP(3) for more |
bb1eea0e KZ |
103 | details. |
104 | .TP | |
01095ae3 | 105 | \-E, \-\-remote |
dddbfa4e WP |
106 | Typically the \fBlogin\fP(1) command is given a remote hostname when |
107 | called by something such as \fBtelnetd\fP(8). This option allows \fBagetty\fP | |
108 | to pass what it is using for a hostname to \fBlogin\fP(1) for use | |
109 | in \fButmp\fP(5). See \fB\-\-host\fP, \fBlogin\fP(1), and \fButmp\fP(5). | |
110 | .IP | |
c9151874 | 111 | If the \fB\-\-host\fP \fIfakehost\fP option is given, then an \fB\-h\fP |
343cc275 SK |
112 | \fIfakehost\fP option and argument are added to the \fB/bin/login\fP |
113 | command line. | |
114 | .IP | |
dddbfa4e | 115 | If the \fB\-\-nohostname\fR option is given, then an \fB\-H\fP option |
343cc275 | 116 | is added to the \fB/bin/login\fP command line. |
dddbfa4e WP |
117 | .IP |
118 | See \fB\-\-login\-options\fR. | |
01095ae3 | 119 | .TP |
1fc82a13 KZ |
120 | \-f, \-\-issue\-file \fIfile|directory\fP |
121 | Display the contents of \fIfile\fP instead of \fI/etc/issue\fP. If the | |
122 | specified path is a \fIdirectory\fP then displays all files with .issue file | |
123 | extension in version-sort order from the directory. This allows custom | |
124 | messages to be displayed on different terminals. The | |
125 | \-\-noissue option will override this option. | |
6a4c63d9 | 126 | .TP |
e85281a8 | 127 | \-h, \-\-flow\-control |
2da0d7c0 | 128 | Enable hardware (RTS/CTS) flow control. It is left up to the |
6dbe3af9 KZ |
129 | application to disable software (XON/XOFF) flow protocol where |
130 | appropriate. | |
131 | .TP | |
dddbfa4e WP |
132 | \-H, \-\-host \fIfakehost\fP |
133 | Write the specified \fIfakehost\fP into the utmp file. Normally, | |
e9980cf8 | 134 | no login host is given, since \fBagetty\fP is used for local hardwired |
2da0d7c0 | 135 | connections and consoles. However, this option can be useful for |
c9151874 | 136 | identifying terminal concentrators and the like. |
e9980cf8 SK |
137 | .TP |
138 | \-i, \-\-noissue | |
fd6b7a7f | 139 | Do not display the contents of \fI/etc/issue\fP (or other) before writing the |
2da0d7c0 | 140 | login prompt. Terminals or communications hardware may become confused |
6dbe3af9 KZ |
141 | when receiving lots of text at the wrong baud rate; dial-up scripts |
142 | may fail if the login prompt is preceded by too much text. | |
143 | .TP | |
e85281a8 | 144 | \-I, \-\-init\-string \fIinitstring\fP |
726f69e2 | 145 | Set an initial string to be sent to the tty or modem before sending |
f61a7d1f | 146 | anything else. This may be used to initialize a modem. Non-printable |
726f69e2 | 147 | characters may be sent by writing their octal code preceded by a |
f61a7d1f BS |
148 | backslash (\\). For example, to send a linefeed character (ASCII 10, |
149 | octal 012), write \\012. | |
0a8dacfe | 150 | .TP |
2da0d7c0 | 151 | \-J, \-\-noclear |
c9151874 | 152 | Do not clear the screen before prompting for the login name. |
dddbfa4e | 153 | By default the screen is cleared. |
726f69e2 | 154 | .TP |
3fc62fd3 | 155 | \-l, \-\-login\-program \fIlogin_program\fP |
c9151874 | 156 | Invoke the specified \fIlogin_program\fP instead of /bin/login. This allows |
dddbfa4e WP |
157 | the use of a non-standard login program. Such a program could, for example, |
158 | ask for a dial-up password or use a different password file. See | |
159 | \fB\-\-login\-options\fP. | |
6dbe3af9 | 160 | .TP |
f61a7d1f BS |
161 | \-L, \-\-local\-line[=\fImode\fP] |
162 | Control the CLOCAL line flag. The optional \fImode\fP argument is 'auto', 'always' or 'never'. | |
163 | If the \fImode\fP argument is omitted, then the default is 'always'. If the | |
164 | \-\-local\-line option is not given at all, then the default is 'auto'. | |
c9151874 SK |
165 | .PP |
166 | .RS | |
167 | .PD 1 | |
168 | .TP | |
169 | \fIalways\fR | |
170 | Forces the line to be a local line with no need for carrier detect. This | |
171 | can be useful when you have a locally attached terminal where the serial | |
172 | line does not set the carrier-detect signal. | |
173 | .TP | |
174 | \fInever\fR | |
175 | Explicitly clears the CLOCAL flag from the line setting and the | |
176 | carrier-detect signal is expected on the line. | |
177 | .TP | |
178 | \fIauto\fR | |
179 | The \fBagetty\fR default. Does not modify the CLOCAL setting and follows | |
180 | the setting enabled by the kernel. | |
181 | .PD | |
182 | .RE | |
eb63b9b8 | 183 | .TP |
3fc62fd3 | 184 | \-m, \-\-extract\-baud |
f61a7d1f | 185 | Try to extract the baud rate from the CONNECT status message |
2da0d7c0 | 186 | produced by Hayes(tm)\-compatible modems. These status |
6dbe3af9 | 187 | messages are of the form: "<junk><speed><junk>". |
fd6b7a7f | 188 | \fBagetty\fP assumes that the modem emits its status message at |
6dbe3af9 KZ |
189 | the same speed as specified with (the first) \fIbaud_rate\fP value |
190 | on the command line. | |
191 | .sp | |
c9151874 SK |
192 | Since the \fB\-\-extract\-baud\fP feature may fail on heavily-loaded |
193 | systems, you still should enable BREAK processing by enumerating all | |
6dbe3af9 | 194 | expected baud rates on the command line. |
2da0d7c0 | 195 | .TP |
11841430 SK |
196 | \-\-list\-speeds |
197 | Display supported baud rates. These are determined at compilation time. | |
198 | .TP | |
e85281a8 | 199 | \-n, \-\-skip\-login |
c9151874 SK |
200 | Do not prompt the user for a login name. This can be used in connection |
201 | with the \fB\-\-login\-program\fP option to invoke a non-standard login | |
202 | process such as a BBS system. Note that with the \fB\-\-skip\-login\fR | |
203 | option, \fBagetty\fR gets no input from the user who logs in and therefore | |
204 | will not be able to figure out parity, character size, and newline | |
205 | processing of the connection. It defaults to space parity, 7 bit | |
206 | characters, and ASCII CR (13) end-of-line character. Beware that the | |
207 | program that \fBagetty\fR starts (usually /bin/login) is run as root. | |
6dbe3af9 | 208 | .TP |
0a8dacfe KZ |
209 | \-N, \-\-nonewline |
210 | Do not print a newline before writing out /etc/issue. | |
211 | .TP | |
dddbfa4e WP |
212 | \-o, \-\-login\-options "\fIlogin_options\fP" |
213 | Options and arguments that are passed to \fBlogin\fP(1). Where \\u is | |
214 | replaced by the login name. For example: | |
215 | .RS | |
216 | .IP "" 4 | |
217 | .B "\-\-login\-options '-h darkstar -- \\\u'" | |
218 | .PP | |
219 | See \fB\-\-autologin\fR, \fB\-\-login\-program\fR and \fB\-\-remote\fR. | |
220 | .PP | |
221 | Please read the SECURITY NOTICE below before using this option. | |
222 | .RE | |
eb8e1f9f | 223 | .TP |
3fc62fd3 | 224 | \-p, \-\-login\-pause |
eb8e1f9f WF |
225 | Wait for any key before dropping to the login prompt. Can be combined |
226 | with \fB\-\-autologin\fP to save memory by lazily spawning shells. | |
227 | .TP | |
f61a7d1f | 228 | \-r, \-\-chroot \fIdirectory\fP |
4b856ee4 KZ |
229 | Change root to the specified directory. |
230 | .TP | |
3aa6b68f | 231 | \-R, \-\-hangup |
f61a7d1f | 232 | Call vhangup() to do a virtual hangup of the specified terminal. |
3aa6b68f | 233 | .TP |
e85281a8 | 234 | \-s, \-\-keep\-baud |
2da0d7c0 | 235 | Try to keep the existing baud rate. The baud rates from |
e9980cf8 SK |
236 | the command line are used when agetty receives a BREAK character. |
237 | .TP | |
238 | \-t, \-\-timeout \fItimeout\fP | |
c9151874 SK |
239 | Terminate if no user name could be read within \fItimeout\fP seconds. |
240 | Use of this option with hardwired terminal lines is not recommended. | |
6dbe3af9 | 241 | .TP |
e85281a8 | 242 | \-U, \-\-detect\-case |
f61a7d1f BS |
243 | Turn on support for detecting an uppercase-only terminal. This setting |
244 | will detect a login name containing only capitals as indicating an | |
245 | uppercase-only terminal and turn on some upper-to-lower case conversions. | |
246 | Note that this has no support for any Unicode characters. | |
ff3d19bd | 247 | .TP |
e85281a8 | 248 | \-w, \-\-wait\-cr |
fd6b7a7f | 249 | Wait for the user or the modem to send a carriage-return or a |
dddbfa4e WP |
250 | linefeed character before sending the \fI/etc/issue\fP file (or others) |
251 | and the login prompt. This is useful with the \fB\-\-init\-string\fP | |
c9151874 | 252 | option. |
e9980cf8 | 253 | .TP |
36601b23 KZ |
254 | \-\-nohints |
255 | Do not print hints about Num, Caps and Scroll Locks. | |
256 | .TP | |
3fc62fd3 | 257 | \-\-nohostname |
e85281a8 DWF |
258 | By default the hostname will be printed. With this option enabled, |
259 | no hostname at all will be shown. | |
260 | .TP | |
261 | \-\-long\-hostname | |
262 | By default the hostname is only printed until the first dot. With | |
c9151874 SK |
263 | this option enabled, the fully qualified hostname by \fBgethostname\fR(3P) |
264 | or (if not found) by \fBgetaddrinfo\fR(3) is shown. | |
e85281a8 | 265 | .TP |
cb872ac9 | 266 | \-\-erase\-chars \fIstring\fP |
6afe9db4 BS |
267 | This option specifies additional characters that should be interpreted as a |
268 | backspace ("ignore the previous character") when the user types the login name. | |
269 | The default additional \'erase\' has been \'#\', but since util-linux 2.23 | |
270 | no additional erase characters are enabled by default. | |
cb872ac9 KZ |
271 | .TP |
272 | \-\-kill\-chars \fIstring\fP | |
6afe9db4 BS |
273 | This option specifies additional characters that should be interpreted as a |
274 | kill ("ignore all previous characters") when the user types the login name. | |
275 | The default additional \'kill\' has been \'@\', but since util-linux 2.23 | |
276 | no additional kill characters are enabled by default. | |
cb872ac9 | 277 | .TP |
0a8dacfe KZ |
278 | \-\-chdir \fIdirectory\fP |
279 | Change directory before the login. | |
280 | .TP | |
281 | \-\-delay \fInumber\fP | |
282 | Sleep seconds before open tty. | |
283 | .TP | |
284 | \-\-nice \fInumber\fP | |
285 | Run login with this priority. | |
286 | .TP | |
6443dd43 SW |
287 | \-\-reload |
288 | Ask all running agetty instances to reload and update their displayed prompts, | |
2da0d7c0 BS |
289 | if the user has not yet commenced logging in. After doing so the command will |
290 | exit. This feature might be unsupported on systems without Linux | |
6443dd43 SW |
291 | .BR inotify (7). |
292 | .TP | |
e9980cf8 | 293 | \-\-version |
6afe9db4 | 294 | Display version information and exit. |
e9980cf8 SK |
295 | .TP |
296 | \-\-help | |
6afe9db4 | 297 | Display help text and exit. |
726f69e2 | 298 | .PP |
6dbe3af9 | 299 | .SH EXAMPLES |
2b6fc908 KZ |
300 | This section shows examples for the process field of an entry in the |
301 | \fI/etc/inittab\fP file. You'll have to prepend appropriate values | |
302 | for the other fields. See \fIinittab(5)\fP for more details. | |
fd6b7a7f | 303 | |
f61a7d1f | 304 | For a hardwired line or a console tty: |
f9da2801 ER |
305 | |
306 | .RS | |
dddbfa4e | 307 | .B /sbin/agetty\ 9600\ ttyS1 |
f9da2801 | 308 | .RE |
6dbe3af9 | 309 | |
f61a7d1f | 310 | For a directly connected terminal without proper carrier-detect wiring |
fd6b7a7f | 311 | (try this if your terminal just sleeps instead of giving you a password: |
f61a7d1f | 312 | prompt): |
f9da2801 ER |
313 | |
314 | .RS | |
dddbfa4e | 315 | .B /sbin/agetty\ \-\-local\-line\ 9600\ ttyS1\ vt100 |
f9da2801 | 316 | .RE |
6dbe3af9 | 317 | |
f61a7d1f | 318 | For an old-style dial-in line with a 9600/2400/1200 baud modem: |
f9da2801 ER |
319 | |
320 | .RS | |
dddbfa4e | 321 | .B /sbin/agetty\ \-\-extract\-baud\ \-\-timeout\ 60\ ttyS1\ 9600,2400,1200 |
f9da2801 | 322 | .RE |
6dbe3af9 | 323 | |
f61a7d1f | 324 | For a Hayes modem with a fixed 115200 bps interface to the machine |
fd6b7a7f | 325 | (the example init string turns off modem echo and result codes, makes |
2da0d7c0 | 326 | modem/computer DCD track modem/modem DCD, makes a DTR drop cause a |
f61a7d1f | 327 | disconnection, and turns on auto-answer after 1 ring): |
f9da2801 | 328 | |
41f22ff3 BIG |
329 | .ie n .RS 0 |
330 | .el .RS | |
dddbfa4e | 331 | .B /sbin/agetty\ \-\-wait\-cr\ \-\-init\-string\ 'ATE0Q1&D2&C1S0=1\\015'\ 115200\ ttyS1 |
f9da2801 | 332 | .RE |
6dbe3af9 | 333 | |
eb8e1f9f | 334 | .SH SECURITY NOTICE |
3fc62fd3 KZ |
335 | If you use the \fB\-\-login\-program\fP and \fB\-\-login\-options\fP options, |
336 | be aware that a malicious user may try to enter lognames with embedded options, | |
2da0d7c0 | 337 | which then get passed to the used login program. Agetty does check |
e85281a8 | 338 | for a leading "\-" and makes sure the logname gets passed as one parameter |
eb8e1f9f WF |
339 | (so embedded spaces will not create yet another parameter), but depending |
340 | on how the login binary parses the command line that might not be sufficient. | |
223939d9 | 341 | Check that the used login program cannot be abused this way. |
eb8e1f9f | 342 | .PP |
e85281a8 | 343 | Some programs use "\-\-" to indicate that the rest of the commandline should |
2da0d7c0 | 344 | not be interpreted as options. Use this feature if available by passing "\-\-" |
e85281a8 | 345 | before the username gets passed by \\u. |
eb8e1f9f | 346 | |
1fc82a13 KZ |
347 | .SH ISSUE FILES |
348 | The default issue file is \fI/etc/issue\fP. If the file exists then agetty also | |
349 | checks for \fI/etc/issue.d\fP directory. The directory is optional extension to | |
350 | the default issue file and content of the directory is printed after | |
351 | \fI/etc/issue\fP content. If the \fI/etc/issue\fP does not exist than the | |
352 | directory is ignored. All files with .issue extension from the directory are | |
353 | printed in version-sort order. The directory allow to maintain 3rd-party | |
354 | messages independently on the primary system \fI/etc/issue\fP file. | |
355 | ||
73afd3f8 | 356 | The default path maybe overridden by \fB\-\-issue\-file\fP option. In this case |
1fc82a13 KZ |
357 | specified path has to be file or directory and the default \fI/etc/issue\fP as |
358 | well as \fI/etc/issue.d\fP are ignored. | |
359 | ||
360 | The issue files may contain certain escape codes to display the system name, date, time | |
f61a7d1f | 361 | etcetera. All escape codes consist of a backslash (\\) immediately |
2da0d7c0 | 362 | followed by one of the characters listed below. |
6dbe3af9 | 363 | |
2b945eda | 364 | .TP |
2da0d7c0 BS |
365 | 4 or 4{\fIinterface\fR} |
366 | Insert the IPv4 address of the specified network interface (for example: \\4{eth0}). | |
367 | If the \fIinterface\fR argument is not specified, then select the first fully | |
368 | configured (UP, non-LOCALBACK, RUNNING) interface. If not any configured | |
369 | interface is found, fall back to the IP address of the machine's hostname. | |
2b945eda | 370 | .TP |
2da0d7c0 | 371 | 6 or 6{\fIinterface\fR} |
0f283438 | 372 | The same as \\4 but for IPv6. |
6dbe3af9 KZ |
373 | .TP |
374 | b | |
375 | Insert the baudrate of the current line. | |
376 | .TP | |
377 | d | |
378 | Insert the current date. | |
379 | .TP | |
2da0d7c0 BS |
380 | e or e{\fIname\fR} |
381 | Translate the human-readable \fIname\fP to an escape sequence and insert it | |
382 | (for example: \\e{red}Alert text.\\e{reset}). If the \fIname\fR argument is | |
383 | not specified, then insert \\033. The currently supported names are: black, | |
384 | blink, blue, bold, brown, cyan, | |
d689166b KZ |
385 | darkgray, gray, green, halfbright, lightblue, lightcyan, lightgray, lightgreen, |
386 | lightmagenta, lightred, magenta, red, reset, reverse, and yellow. All unknown | |
387 | names are silently ignored. | |
583627ef | 388 | .TP |
6dbe3af9 | 389 | s |
c9151874 | 390 | Insert the system name (the name of the operating system). Same as 'uname \-s'. |
2da0d7c0 | 391 | See also the \\S escape code. |
b34f097e KZ |
392 | .TP |
393 | S or S{VARIABLE} | |
2da0d7c0 BS |
394 | Insert the VARIABLE data from \fI/etc/os-release\fP. If this file does not exist |
395 | then fall back to \fI/usr/lib/os-release\fP. If the VARIABLE argument is not | |
396 | specified, then use PRETTY_NAME from the file or the system name (see \\s). | |
b34f097e KZ |
397 | This escape code allows to keep \fI/etc/issue\fP distribution and release |
398 | independent. Note that \\S{ANSI_COLOR} is converted to the real terminal | |
399 | escape sequence. | |
6dbe3af9 KZ |
400 | .TP |
401 | l | |
402 | Insert the name of the current tty line. | |
403 | .TP | |
404 | m | |
c9151874 | 405 | Insert the architecture identifier of the machine. Same as 'uname \-m'. |
6dbe3af9 KZ |
406 | .TP |
407 | n | |
c9151874 | 408 | Insert the nodename of the machine, also known as the hostname. Same as 'uname \-n'. |
6dbe3af9 KZ |
409 | .TP |
410 | o | |
c9151874 | 411 | Insert the NIS domainname of the machine. Same as 'hostname \-d'. |
e61e66bd KZ |
412 | .TP |
413 | O | |
414 | Insert the DNS domainname of the machine. | |
6dbe3af9 KZ |
415 | .TP |
416 | r | |
c9151874 | 417 | Insert the release number of the OS. Same as 'uname \-r'. |
6dbe3af9 KZ |
418 | .TP |
419 | t | |
420 | Insert the current time. | |
421 | .TP | |
422 | u | |
423 | Insert the number of current users logged in. | |
424 | .TP | |
425 | U | |
426 | Insert the string "1 user" or "<n> users" where <n> is the number of current | |
427 | users logged in. | |
f61a7d1f | 428 | .TP |
6dbe3af9 | 429 | v |
dddbfa4e | 430 | Insert the version of the OS, that is, the build-date and such. |
e438668b | 431 | .PP |
2da0d7c0 | 432 | An example. On my system, the following \fI/etc/issue\fP file: |
e438668b | 433 | .sp |
6dbe3af9 | 434 | .na |
e438668b | 435 | .RS |
6dbe3af9 | 436 | .nf |
6dbe3af9 | 437 | This is \\n.\\o (\\s \\m \\r) \\t |
e438668b ER |
438 | .fi |
439 | .RE | |
440 | .PP | |
f61a7d1f | 441 | displays as: |
e438668b ER |
442 | .sp |
443 | .RS | |
444 | .nf | |
6dbe3af9 | 445 | This is thingol.orcan.dk (Linux i386 1.1.9) 18:29:30 |
6dbe3af9 | 446 | .fi |
e438668b | 447 | .RE |
6dbe3af9 KZ |
448 | |
449 | .SH FILES | |
450 | .na | |
48cb48dc | 451 | .TP |
46f057ed | 452 | .I /var/run/utmp |
48cb48dc ER |
453 | the system status file. |
454 | .TP | |
46f057ed | 455 | .I /etc/issue |
48cb48dc ER |
456 | printed before the login prompt. |
457 | .TP | |
46f057ed | 458 | .I /etc/os-release /usr/lib/os-release |
b34f097e KZ |
459 | operating system identification data. |
460 | .TP | |
46f057ed | 461 | .I /dev/console |
48cb48dc ER |
462 | problem reports (if syslog(3) is not used). |
463 | .TP | |
46f057ed | 464 | .I /etc/inittab |
b34f097e | 465 | \fIinit\fP(8) configuration file for SysV-style init daemon. |
6dbe3af9 KZ |
466 | .SH BUGS |
467 | .ad | |
468 | .fi | |
c9151874 | 469 | The baud-rate detection feature (the \fB\-\-extract\-baud\fP option) requires that |
fd6b7a7f | 470 | \fBagetty\fP be scheduled soon enough after completion of a dial-in |
2da0d7c0 | 471 | call (within 30 ms with modems that talk at 2400 baud). For robustness, |
c9151874 | 472 | always use the \fB\-\-extract\-baud\fP option in combination with a multiple baud |
6dbe3af9 KZ |
473 | rate command-line argument, so that BREAK processing is enabled. |
474 | ||
fd6b7a7f | 475 | The text in the \fI/etc/issue\fP file (or other) and the login prompt |
6dbe3af9 KZ |
476 | are always output with 7-bit characters and space parity. |
477 | ||
c9151874 | 478 | The baud-rate detection feature (the \fB\-\-extract\-baud\fP option) requires that |
6dbe3af9 KZ |
479 | the modem emits its status message \fIafter\fP raising the DCD line. |
480 | .SH DIAGNOSTICS | |
481 | .ad | |
482 | .fi | |
483 | Depending on how the program was configured, all diagnostics are | |
c9151874 | 484 | written to the console device or reported via the \fBsyslog\fR(3) facility. |
6dbe3af9 | 485 | Error messages are produced if the \fIport\fP argument does not |
726f69e2 | 486 | specify a terminal device; if there is no utmp entry for the |
6dbe3af9 | 487 | current process (System V only); and so on. |
4cfda3dc KZ |
488 | .SH AUTHORS |
489 | .UR werner@suse.de | |
490 | Werner Fink | |
491 | .UE | |
492 | .br | |
493 | .UR kzak@redhat.com | |
494 | Karel Zak | |
495 | .UE | |
496 | .sp | |
497 | The original | |
498 | .B agetty | |
499 | for serial terminals was written by W.Z. Venema <wietse@wzv.win.tue.nl> | |
500 | and ported to Linux by Peter Orbaek <poe@daimi.aau.dk>. | |
6dbe3af9 | 501 | |
86d62711 | 502 | .SH AVAILABILITY |
601d12fb | 503 | The agetty command is part of the util-linux package and is available from |
d673b74e | 504 | https://www.kernel.org/pub/linux/utils/util\-linux/. |