Agetty Command in Linux

agetty is a command similar to getty in Unix, which stands for “get tty”. It is used to manage virtual terminals or physical to allow access by multiple users. Linux users can access the virtual terminal (tty) like a regular terminal.

When you run the agetty command, it will open a virtual terminal(tty port), then asks users for login name and call /bin/login/ command.

And here is a guide to using the agetty command in Linux.

Syntax of agetty command

$ sudo agetty [options] port [baud_rate...] [term]


port: is a pathname relative to the /dev directory. If “-” is specified, the command confirms that its standard input is already connected to tty port that can connect to the remote user.

baud_rate: one or more baud rates separated by commas and it is in descending order

term: this is the specified value for the TERM environment variable


-8, -8bits: Assume 8-bit tty.

-a, -autologin: Automatic login for the specified user.

-c, -noreset: Don’t reset control mode.

-E, -remote: allows agetty to pass what it is using for a hostname to login(1) for use in utmp(5).

-h, -flow-control: Enables CTS/RTS handshaking (flow control).

-i, -noissue: Don’t display the issue file.

-J -noclear: Don’t clear the screen before the prompt.

-m, -extract-baud: Use extract-baud rate during connect.

-n, -skip-login: Do not prompt for login.

-p, -login-pause: before there is a login prompt it will wait for the user to press any key.

-R, -hangup: perform a VM hang of the specified terminal by calling vhangup()

-s, -keep-baud: Try to keep the previously used baud rate.

-t, –timeout: if no username can be read within seconds of timeout it will end the login session.

-U, –detect-case: enable terminal checking for uppercase only.


$ agetty -8 - linux



$ agetty -a -8 -t 6 - linux



$ agetty --version




You have just seen a detailed tutorial on how to use the agetty command in Linux.

Thank you for reading.

Print Friendly, PDF & Email