| GETTY(8) | System Manager's Manual | GETTY(8) |
NAME
getty — set up a
terminal and ask for a login name
SYNOPSIS
getty |
[type [tty]] |
DESCRIPTION
The getty program is run by
init(8) for each terminal marked
“on” in ttys(5). It opens
/dev/tty as the controlling
terminal of a new session and as its standard input, output and error,
configures the line from the
gettytab(5) record
type (or “default”), prints a banner and
a login prompt, and runs login(1) with
the name that is typed. A tty of “-”
means the terminal getty was started on.
The banner is the record's if file, or
else its im string, and the prompt is its
lm string. In each, the escapes
‘%t’ (the terminal),
‘%h’ (the host name),
‘%s’,
‘%r’,
‘%v’,
‘%m’ (the system's name, release,
version and machine), ‘%d’ (the date
and time) and ‘%%’ are replaced.
An empty line prompts again. A break (a line holding a NUL
character) switches to the record named by nx, for
serial lines whose speed is found by trying each in turn. With
to set, getty exits if no
name is typed within that many seconds, and
init(8) starts a new one. A record with
al logs its user in automatically.
FILES
- /etc/gettytab
- terminal descriptions
- /etc/ttys
- the terminals init(8) runs
gettyon
SEE ALSO
HISTORY
A getty program appeared in
Version 6 AT&T UNIX. This implementation
was written for OxideBSD.
| September 26, 2026 | OxideBSD |