3 agetty \- alternative Linux getty
6 .BR "agetty " [\-8ihLmnUw]
7 .RI "[-f " issue_file ]
8 .RI "[-l " login_program ]
11 .RI "[-H " login_host ]
16 .BR "agetty " [\-8ihLmnw]
17 .RI "[-f " issue_file ]
18 .RI "[-l " login_program ]
21 .RI "[-H " login_host ]
29 \fBagetty\fP opens a tty port, prompts for a login name and invokes
30 the /bin/login command. It is normally invoked by \fIinit(8)\fP.
32 \fBagetty\fP has several \fInon-standard\fP features that are useful
33 for hard-wired and for dial-in lines:
35 Adapts the tty settings to parity bits and to erase, kill,
36 end-of-line and uppercase characters when it reads a login name.
37 The program can handle 7-bit characters with even, odd, none or space
38 parity, and 8-bit characters with no parity. The following special
39 characters are recognized: @ and Control-U (kill); #, DEL and
40 back space (erase); carriage return and line feed (end of line).
42 Optionally deduces the baud rate from the CONNECT messages produced by
43 Hayes(tm)-compatible modems.
45 Optionally does not hang up when it is given an already opened line
46 (useful for call-back applications).
48 Optionally does not display the contents of the \fI/etc/issue\fP file.
50 Optionally displays an alternative issue file instead of \fI/etc/issue\fP.
52 Optionally does not ask for a login name.
54 Optionally invokes a non-standard login program instead of
57 Optionally turns on hard-ware flow control
59 Optionally forces the line to be local with no need for carrier detect.
61 This program does not use the \fI/etc/gettydefs\fP (System V) or
62 \fI/etc/gettytab\fP (SunOS 4) files.
70 A path name relative to the \fI/dev\fP directory. If a "-" is
71 specified, \fBagetty\fP assumes that its standard input is
72 already connected to a tty port and that a connection to a
73 remote user has already been established.
75 Under System V, a "-" \fIport\fP argument should be preceded
79 A comma-separated list of one or more baud rates. Each time
80 \fBagetty\fP receives a BREAK character it advances through
81 the list, which is treated as if it were circular.
83 Baud rates should be specified in descending order, so that the
84 null character (Ctrl-@) can also be used for baud rate switching.
87 The value to be used for the TERM environment variable. This overrides
88 whatever init(8) may have set, and is inherited by login and the shell.
96 Assume that the tty is 8-bit clean, hence disable parity detection.
99 Enable hardware (RTS/CTS) flow control. It is left up to the
100 application to disable software (XON/XOFF) flow protocol where
104 Do not display the contents of \fI/etc/issue\fP (or other) before writing the
105 login prompt. Terminals or communications hardware may become confused
106 when receiving lots of text at the wrong baud rate; dial-up scripts
107 may fail if the login prompt is preceded by too much text.
110 Display the contents of \fIissue_file\fP instead of \fI/etc/issue\fP.
111 This allows custom messages to be displayed on different terminals.
112 The \-i option will override this option.
115 Set an initial string to be sent to the tty or modem before sending
116 anything else. This may be used to initialize a modem. Non printable
117 characters may be sent by writing their octal code preceded by a
118 backslash (\\). For example to send a linefeed character (ASCII 10,
119 octal 012) write \\012.
122 \-l \fIlogin_program\fP
123 Invoke the specified \fIlogin_program\fP instead of /bin/login.
124 This allows the use of a non-standard login program (for example,
125 one that asks for a dial-up password or that uses a different
129 Write the specified \fIlogin_host\fP into the utmp file. (Normally,
130 no login host is given, since \fBagetty\fP is used for local hardwired
131 connections and consoles. However, this option can be useful for
132 identifying terminal concentrators and the like.
135 Try to extract the baud rate the CONNECT status message
136 produced by Hayes(tm)\-compatible modems. These status
137 messages are of the form: "<junk><speed><junk>".
138 \fBagetty\fP assumes that the modem emits its status message at
139 the same speed as specified with (the first) \fIbaud_rate\fP value
142 Since the \fI\-m\fP feature may fail on heavily-loaded systems,
143 you still should enable BREAK processing by enumerating all
144 expected baud rates on the command line.
147 Do not prompt the user for a login name. This can be used in
148 connection with \-l option to invoke a non-standard login process such
149 as a BBS system. Note that with the \-n option, \fBagetty\fR gets no input from
150 user who logs in and therefore won't be able to figure out parity,
151 character size, and newline processing of the connection. It defaults to
152 space parity, 7 bit characters, and ASCII CR (13) end-of-line character.
153 Beware that the program that \fBagetty\fR starts (usually /bin/login)
157 Terminate if no user name could be read within \fItimeout\fP
158 seconds. This option should probably not be used with hard-wired
162 Force the line to be a local line with no need for carrier detect. This can
163 be useful when you have a locally attached terminal where the serial line
164 does not set the carrier detect signal.
167 Turn on support for detecting an uppercase only terminal. This setting will
168 detect a login name containing only capitals as indicating an uppercase
169 only terminal and turn on some upper to lower case conversions. Note that
170 this has no support for any unicode characters.
173 Wait for the user or the modem to send a carriage-return or a
174 linefeed character before sending the \fI/etc/issue\fP (or other) file
175 and the login prompt. Very useful in connection with the \-I option.
178 This section shows examples for the process field of an entry in the
179 \fI/etc/inittab\fP file. You'll have to prepend appropriate values
180 for the other fields. See \fIinittab(5)\fP for more details.
182 For a hard-wired line or a console tty:
184 /sbin/agetty 9600 ttyS1
186 For a directly connected terminal without proper carriage detect wiring:
187 (try this if your terminal just sleeps instead of giving you a password:
190 /sbin/agetty \-L 9600 ttyS1 vt100
192 For a old style dial-in line with a 9600/2400/1200 baud modem:
194 /sbin/agetty \-mt60 ttyS1 9600,2400,1200
196 For a Hayes modem with a fixed 115200 bps interface to the machine:
197 (the example init string turns off modem echo and result codes, makes
198 modem/computer DCD track modem/modem DCD, makes a DTR drop cause a
199 dis-connection and turn on auto-answer after 1 ring.)
201 /sbin/agetty \-w \-I 'ATE0Q1&D2&C1S0=1\\015' 115200 ttyS1
204 The issue-file (\fI/etc/issue\fP or the file set with the \-f option)
205 may contain certain escape codes to display the system name, date and
206 time etc. All escape codes consist of a backslash (\\) immediately
207 followed by one of the letters explained below.
211 Insert the baudrate of the current line.
214 Insert the current date.
217 Insert the system name, the name of the operating system.
220 Insert the name of the current tty line.
223 Insert the architecture identifier of the machine, eg. i486
226 Insert the nodename of the machine, also known as the hostname.
229 Insert the NIS domainname of the machine.
232 Insert the DNS domainname of the machine.
235 Insert the release number of the OS, eg. 1.1.9.
238 Insert the current time.
241 Insert the number of current users logged in.
244 Insert the string "1 user" or "<n> users" where <n> is the number of current
248 Insert the version of the OS, eg. the build-date etc.
250 Example: On my system, the following \fI/etc/issue\fP file:
255 This is \\n.\\o (\\s \\m \\r) \\t
260 This is thingol.orcan.dk (Linux i386 1.1.9) 18:29:30
267 /var/run/utmp, the system status file.
268 /etc/issue, printed before the login prompt.
269 /dev/console, problem reports (if syslog(3) is not used).
270 /etc/inittab, \fIinit\fP(8) configuration file.
274 The baud-rate detection feature (the \fI-m\fP option) requires that
275 \fBagetty\fP be scheduled soon enough after completion of a dial-in
276 call (within 30 ms with modems that talk at 2400 baud). For robustness,
277 always use the \fI\-m\fP option in combination with a multiple baud
278 rate command-line argument, so that BREAK processing is enabled.
280 The text in the \fI/etc/issue\fP file (or other) and the login prompt
281 are always output with 7-bit characters and space parity.
283 The baud-rate detection feature (the \fI-m\fP option) requires that
284 the modem emits its status message \fIafter\fP raising the DCD line.
288 Depending on how the program was configured, all diagnostics are
289 written to the console device or reported via the syslog(3) facility.
290 Error messages are produced if the \fIport\fP argument does not
291 specify a terminal device; if there is no utmp entry for the
292 current process (System V only); and so on.
296 W.Z. Venema <wietse@wzv.win.tue.nl>
297 Eindhoven University of Technology
298 Department of Mathematics and Computer Science
299 Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands
301 Peter Orbaek <poe@daimi.aau.dk>
302 Linux port and more options. Still maintains the code.
304 Eric Rasmussen <ear@usfirst.org>
305 Added \-f option to display custom login messages on different terminals.
308 The agetty command is part of the util-linux-ng package and is available from
309 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.