1AGETTY(8)                   System Manager's Manual                  AGETTY(8)
2
3
4

NAME

6       agetty - alternative Linux getty
7
8

SYNOPSIS

10       agetty  [-8ihLmnsUw]  [-f  issue_file] [-l login_program] [-I init] [-t
11       timeout] [-H login_host] port baud_rate,...  [term]
12
13

DESCRIPTION

15       agetty opens a tty port, prompts for  a  login  name  and  invokes  the
16       /bin/login command. It is normally invoked by init(8).
17
18       agetty has several non-standard features that are useful for hard-wired
19       and for dial-in lines:
20
21       o      Adapts the tty settings to parity bits and to erase, kill,  end-
22              of-line  and  uppercase  characters  when it reads a login name.
23              The program can handle 7-bit characters with even, odd, none  or
24              space parity, and 8-bit characters with no parity. The following
25              special characters are recognized: @ and  Control-U  (kill);  #,
26              DEL  and  back space (erase); carriage return and line feed (end
27              of line).
28
29       o      Optionally deduces the baud rate from the CONNECT messages  pro‐
30              duced by Hayes(tm)-compatible modems.
31
32       o      Optionally  does  not hang up when it is given an already opened
33              line (useful for call-back applications).
34
35       o      Optionally does not display the contents of the /etc/issue file.
36
37       o      Optionally  displays  an  alternative  issue  file  instead   of
38              /etc/issue.
39
40       o      Optionally does not ask for a login name.
41
42       o      Optionally  invokes  a  non-standard  login  program  instead of
43              /bin/login.
44
45       o      Optionally turns on hard-ware flow control
46
47       o      Optionally forces the line to be local with no need for  carrier
48              detect.
49
50       This  program  does  not use the /etc/gettydefs (System V) or /etc/get‐
51       tytab (SunOS 4) files.
52

ARGUMENTS

54       port   A path name relative to the /dev directory. If a "-"  is  speci‐
55              fied,  agetty  assumes  that  its standard input is already con‐
56              nected to a tty port and that a connection to a remote user  has
57              already been established.
58
59              Under  System  V,  a  "-"  port argument should be preceded by a
60              "--".
61
62       baud_rate,...
63              A comma-separated list of one or  more  baud  rates.  Each  time
64              agetty  receives a BREAK character it advances through the list,
65              which is treated as if it were circular.
66
67              Baud rates should be specified in descending order, so that  the
68              null  character  (Ctrl-@) can also be used for baud rate switch‐
69              ing.
70
71       term   The value to be used for the  TERM  environment  variable.  This
72              overrides  whatever  init(8)  may  have set, and is inherited by
73              login and the shell.
74

OPTIONS

76       -8     Assume that the tty is 8-bit clean, hence disable parity  detec‐
77              tion.
78
79       -h     Enable  hardware  (RTS/CTS)  flow  control. It is left up to the
80              application to disable software (XON/XOFF) flow  protocol  where
81              appropriate.
82
83       -i     Do  not  display  the  contents  of /etc/issue (or other) before
84              writing the login prompt. Terminals or  communications  hardware
85              may  become  confused  when  receiving lots of text at the wrong
86              baud rate; dial-up scripts may fail if the login prompt is  pre‐
87              ceded by too much text.
88
89       -f issue_file
90              Display  the contents of issue_file instead of /etc/issue.  This
91              allows custom messages to be displayed on  different  terminals.
92              The -i option will override this option.
93
94       -I initstring
95              Set  an  initial  string  to  be sent to the tty or modem before
96              sending anything else. This may be used to initialize  a  modem.
97              Non printable characters may be sent by writing their octal code
98              preceded by a backslash (\). For  example  to  send  a  linefeed
99              character (ASCII 10, octal 012) write \012.
100
101       -l login_program
102              Invoke  the specified login_program instead of /bin/login.  This
103              allows the use of a non-standard login program (for example, one
104              that  asks for a dial-up password or that uses a different pass‐
105              word file).
106
107       -H login_host
108              Write the specified login_host into the utmp file. (Normally, no
109              login  host  is  given, since agetty is used for local hardwired
110              connections and consoles. However, this option can be useful for
111              identifying terminal concentrators and the like.
112
113       -m     Try to extract the baud rate the CONNECT status message produced
114              by Hayes(tm)-compatible modems. These status messages are of the
115              form:  "<junk><speed><junk>".   agetty  assumes  that  the modem
116              emits its status message at the same  speed  as  specified  with
117              (the first) baud_rate value on the command line.
118
119              Since  the  -m  feature  may fail on heavily-loaded systems, you
120              still should enable BREAK processing by enumerating all expected
121              baud rates on the command line.
122
123       -n     Do  not  prompt  the  user for a login name. This can be used in
124              connection with -l option to invoke a non-standard login process
125              such  as a BBS system. Note that with the -n option, agetty gets
126              no input from user who logs in and therefore won't  be  able  to
127              figure out parity, character size, and newline processing of the
128              connection. It defaults to space parity, 7 bit  characters,  and
129              ASCII  CR  (13)  end-of-line character.  Beware that the program
130              that agetty starts (usually /bin/login) is run as root.
131
132       -t timeout
133              Terminate if no user name could be read within timeout  seconds.
134              This option should probably not be used with hard-wired lines.
135
136       -L     Force  the  line  to  be  a  local line with no need for carrier
137              detect. This can be useful when you have a locally attached ter‐
138              minal where the serial line does not set the carrier detect sig‐
139              nal.
140
141       -s     Try to keep the existing baud rate. The baud rates from the com‐
142              mand line are used when agetty receives a BREAK character.
143
144       -U     Turn  on support for detecting an uppercase only terminal.  This
145              setting will detect a login name  containing  only  capitals  as
146              indicating  an uppercase only terminal and turn on some upper to
147              lower case conversions.  Note that this has no support  for  any
148              unicode characters.
149
150       -w     Wait  for  the  user or the modem to send a carriage-return or a
151              linefeed character before sending the /etc/issue (or other) file
152              and  the  login  prompt.  Very  useful in connection with the -I
153              option.
154

EXAMPLES

156       This section shows examples for the process field of an  entry  in  the
157       /etc/inittab  file.   You'll have to prepend appropriate values for the
158       other fields.  See inittab(5) for more details.
159
160       For a hard-wired line or a console tty:
161            /sbin/agetty 9600 ttyS1
162
163       For a  directly  connected  terminal  without  proper  carriage  detect
164       wiring:  (try this if your terminal just sleeps instead of giving you a
165       password: prompt.)
166            /sbin/agetty -L 9600 ttyS1 vt100
167
168       For a old style dial-in line with a 9600/2400/1200 baud modem:
169            /sbin/agetty -mt60 ttyS1 9600,2400,1200
170
171       For a Hayes modem with a fixed 115200 bps  interface  to  the  machine:
172       (the  example  init string turns off modem echo and result codes, makes
173       modem/computer DCD track modem/modem DCD, makes a DTR drop cause a dis-
174       connection and turn on auto-answer after 1 ring.)
175            /sbin/agetty -w -I 'ATE0Q1&D2&C1S0=1\015' 115200 ttyS1
176
177

ISSUE ESCAPES

179       The issue-file (/etc/issue or the file set with the -f option) may con‐
180       tain certain escape codes to display the system  name,  date  and  time
181       etc.  All  escape codes consist of a backslash (\) immediately followed
182       by one of the letters explained below.
183
184
185       b      Insert the baudrate of the current line.
186
187       d      Insert the current date.
188
189       s      Insert the system name, the name of the operating system.
190
191       l      Insert the name of the current tty line.
192
193       m      Insert the architecture identifier of the machine, eg. i486
194
195       n      Insert the nodename of the machine, also known as the hostname.
196
197       o      Insert the NIS domainname of the machine.
198
199       O      Insert the DNS domainname of the machine.
200
201       r      Insert the release number of the OS, eg. 1.1.9.
202
203       t      Insert the current time.
204
205       u      Insert the number of current users logged in.
206
207       U      Insert the string "1 user" or "<n> users" where <n> is the  num‐
208              ber of current users logged in.
209
210       v      Insert the version of the OS, eg. the build-date etc.
211
212       Example: On my system, the following /etc/issue file:
213
214              This is \n.\o (\s \m \r) \t
215
216       displays as
217
218              This is thingol.orcan.dk (Linux i386 1.1.9) 18:29:30
219
220
221

FILES

223       /var/run/utmp, the system status file.
224       /etc/issue, printed before the login prompt.
225       /dev/console, problem reports (if syslog(3) is not used).
226       /etc/inittab, init(8) configuration file.
227

BUGS

229       The baud-rate detection feature (the -m option) requires that agetty be
230       scheduled soon enough after completion of a dial-in call (within 30  ms
231       with  modems that talk at 2400 baud). For robustness, always use the -m
232       option in combination with a multiple baud rate command-line  argument,
233       so that BREAK processing is enabled.
234
235       The  text  in  the  /etc/issue file (or other) and the login prompt are
236       always output with 7-bit characters and space parity.
237
238       The baud-rate detection feature (the -m option) requires that the modem
239       emits its status message after raising the DCD line.
240

DIAGNOSTICS

242       Depending  on how the program was configured, all diagnostics are writ‐
243       ten to the console device  or  reported  via  the  syslog(3)  facility.
244       Error  messages  are  produced  if the port argument does not specify a
245       terminal device; if there is no utmp  entry  for  the  current  process
246       (System V only); and so on.
247

AUTHOR(S)

249       W.Z. Venema <wietse@wzv.win.tue.nl>
250       Eindhoven University of Technology
251       Department of Mathematics and Computer Science
252       Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands
253
254       Peter Orbaek <poe@daimi.aau.dk>
255       Linux port and more options. Still maintains the code.
256
257       Eric Rasmussen <ear@usfirst.org>
258       Added -f option to display custom login messages on different terminals.
259
260

AVAILABILITY

262       The agetty command is part of the util-linux-ng package and is avail‐
263       able from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
264
265
266
267                                                                     AGETTY(8)
Impressum