← 返回命令列表

Linux command

agetty 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

agetty [tty] [115200]

Example

agetty -t [timeout_in_seconds] -

Example

agetty -8 - [term_var]

Example

agetty -n -l [login_program] [tty]

Example

agetty -i -

说明

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.

参数

-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

FAQ

What is the agetty command used for?

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.

How do I run a basic agetty example?

Run `agetty [tty] [115200]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -8, --8bits do in agetty?

Disable parity detection for 8-bit clean terminals