LinuxCommandLibrary

getty

TLDR

Start getty on terminal

$ getty [tty1] [38400]
copy
Auto-login user
$ getty -a [username] [tty1]
copy
With specific term
$ getty -T [linux] [tty1] [38400]
copy
Wait for carrier
$ getty -w [ttyS0] [9600]
copy

SYNOPSIS

getty [options] port [baud]

DESCRIPTION

getty (get teletype) opens terminal ports, sets modes, and invokes login. It manages the login prompt on system consoles and serial ports.
The program is started by init/systemd for each terminal requiring login access. It handles baud rate detection for serial terminals and terminal type configuration.
getty provides the foundational login interface for Unix systems.

PARAMETERS

PORT

Terminal device (tty1, ttyS0).
BAUD
Baud rate.
-a USER, --autologin USER
Auto-login specified user.
-n, --skip-login
Don't prompt for login.
-T TERM, --term TERM
Terminal type.
-w, --wait-cr
Wait for carrier/carriage return.
--help
Display help information.

CAVEATS

Usually started by init/systemd. Direct invocation rare. Serial configuration complex.

HISTORY

getty dates back to early Unix, managing teletypes and terminals. Modern Linux uses agetty (alternative getty), which provides additional features.

SEE ALSO

agetty(1), login(1), init(1)

Copied to clipboard