LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

agetty

Open a terminal and prompt for login

TLDR

Connect stdin to a port with an optional baud rate
$ agetty [tty] [115200]
copy
Set a timeout for the login
$ agetty -t [timeout_in_seconds] -
copy
Assume the tty is 8-bit clean and override the TERM variable
$ agetty -8 - [term_var]
copy
Skip the login and invoke another login program
$ agetty -n -l [login_program] [tty]
copy
Do not display the pre-login issue file
$ agetty -i -
copy

SYNOPSIS

agetty [options] port [baudrate...] [term_]

DESCRIPTION

agetty opens a tty port, prompts for a login name, and invokes the /bin/login command. It is normally invoked by init(8). The command provides features useful for hardwired and dial-in connections, including automatic parity detection, baud rate deduction from modem messages, and optional hardware flow control.

PARAMETERS

-8, --8bits

Disable parity detection for 8-bit clean terminals
-a, --autologin username
Automatic login without prompting for username
-h, --flow-control
Enable RTS/CTS hardware flow control
-i, --noissue
Skip displaying /etc/issue
-J, --noclear
Don't clear screen before login prompt
-l, --login-program program
Use alternative login executable
-L, --local-line
Control carrier detect requirement
-m, --extract-baud
Extract baud rate from modem status messages
-n, --skip-login
Don't prompt for login name
-r, --chroot directory
Change the root directory
-H, --host hostname
Write a specific fake host into the utmp file
-t, --timeout seconds
Terminate if no input within timeout

CONFIGURATION

/etc/issue

Pre-login message displayed before the login prompt. Supports escape codes for system information.
/etc/os-release
Operating system identification data used by agetty for \S escape in /etc/issue.

INSTALL

sudo apt install util-linux
copy
sudo dnf install util-linux
copy
sudo pacman -S util-linux
copy
sudo apk add agetty
copy
sudo zypper install util-linux
copy
brew install util-linux
copy
nix profile install nixpkgs#util-linux
copy

CAVEATS

The baud rate is the speed of data transfer between a terminal and a device over a serial connection. Default is 9600 for serial terminals.

HISTORY

Part of util-linux package. Alternative to the traditional getty command with additional features for modern Linux systems.

SEE ALSO

login(1), init(8), getty(8)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid