agetty command in Linux with Examples Last Updated : 15 Oct, 2024 Suggest changes Share Like Article Like Report agetty is a Linux version of getty. getty short for "get tty" is a Unix program running on a host computer that manages physical or virtual terminals to allow multi-user access. Linux provides a virtual terminal(tty) which is similar to the regular Linux terminal. agetty command opens a virtual terminal(tty port), prompts for a login name, and invokes the /bin/login command. Syntaxagetty [options] port [baud_rate...] [term]where,port: It is a pathname relative to the /dev directory. If a "-" is specified, then this command considers that its standard input is already connected to a tty port and that a connection to a remote user has already been established.baud_rate, ...: It is a comma-separated list of one or more baud rates. It should be specified in the descending order.term: It is the value to be used for the TERM environment variable.Common Options used with the agetty commandOptionDescription-8, --8bitsAssume 8-bit tty, meaning full 8-bit data transmission.-a, --autologinAutomatically logs in the specified user without a password prompt.-c, --noresetDo not reset control mode upon start.-E, --remoteAllows passing a hostname to login for remote connections (e.g., via telnetd).-h, --flow-controlEnables hardware flow control using CTS/RTS handshaking for smoother communication.-i, --noissueDo not display the issue file (custom login message).-J, --noclearDo not clear the screen before displaying the login prompt.-m, --extract-baudExtract the baud rate from the terminal device during connection.-n, --skip-loginSkip the login prompt and go directly to session (useful for auto-login setups).-p, --login-pauseWait for the user to press any key before showing the login prompt.-R, --hangupPerform a virtual hangup (vhangup) to disconnect the specified terminal.-s, --keep-baudAttempt to keep the previously used baud rate for the terminal connection.-t, --timeoutSets a timeout (in seconds) to terminate the session if the login prompt is not completed in time.-U, --detect-caseDetect uppercase-only terminals and adjust login accordingly.--helpDisplay a help message with a list of all available options.--versionDisplay the current version of the agetty command.For more details about the options you can run the following command on the terminal: agetty --helpLinux agetty command Examples1. agetty -8 - linux -8 option for 8-bit tty.'-' for specifies that standard input is already connected to a tty port.baud rate is optional so not used here.'linux' is value of TERM environment variable.2. agetty -8 -t 5 - linux -t 5 is the login process timeout.3. agetty -h -t 60 tty 9600 vtxxx tty refers to the device /dev/tty.9600 is the bits per second bound rate.vtxxx is the TERM environment variable to indicate that a VTxxx terminal is connecting, in the previous example 'linux' is used as TERM env.-h activates CTS/RTS handshaking (flow control).-t 60 allows 60 seconds for someone to attempt to log in before the modem is hung up.4. agetty -a -h -t 60 tty 9600 vt102 -a specifies autologin.5. agetty --version To display the version information. 6. agetty -a -h -t 60 -U -s -m tty 9600 vt100 -U detects the uppercase terminal.-s try to use existing baud rate.-m use exact baud rate specified in the command.ConclusionThe agetty command is an essential tool for managing terminal sessions in Linux, particularly for embedded systems, servers, and environments requiring serial connections. With its numerous options, such as autologin, flow control, timeout settings, and baud rate management, agetty provides robust control over terminal and user session management. Create Quiz S ShubhamPandey27 Follow 0 Article Tags : Linux-Unix linux-command Explore Getting Started with LinuxIntroduction to Linux Operating System7 min readLINUX Full Form - Lovable Intellect Not Using XP2 min readDifference between Linux and Windows7 min readLinux Distributions6 min readDifference between Unix and Linux6 min readInstallation with LinuxInstallation of Arch Linux in VirtualBox4 min readFedora Linux Operating System5 min readHow to install Ubuntu on VirtualBox?6 min readHow to Install Linux Mint?3 min readInstallation of Kali Linux in Virtual Machine2 min readHow to Install Linux on Windows PowerShell Subsystem?2 min readHow to Find openSUSE Linux Version?2 min readInstallation of CentOS2 min readLinux CommandsLinux Commands15+ min readEssential Unix Commands7 min readFind Command in Linux with Examples7 min readLinux File SystemLinux File System12 min readLinux File Hierarchy Structure5 min readLinux Directory Structure6 min readLinux KernelLinux Kernel4 min readKernel in Operating System3 min readHow Linux Kernel Boots?11 min readDifference between Operating System and Kernel3 min readLinux Kernel Module Programming: Hello World Program7 min readLinux Loadable Kernel Module7 min readLoadable Kernel Module - Linux Device Driver Development4 min readLinux Networking ToolsNetwork configuration and troubleshooting commands in Linux5 min readHow to configure network interfaces in CentOS?5 min readCommand-Line Tools and Utilities For Network Management in Linux8 min readLinux - Network Monitoring Tools4 min readLinux ProcessProcesses in Linux/Unix5 min readHow to Manage Process in Linux4 min readGetting System and Process Information Using C Programming and Shell in Linux2 min readProcess states and Transitions in a UNIX Process4 min readLinux FirewallLINUX Firewall7 min readiptables command in Linux with Examples7 min readHow to Configure your Linux Firewall - 3 Methods12 min readShell Scripting & Bash ScriptingIntroduction to Linux Shell and Shell Scripting7 min readUnderstanding Terminal, Console, Shell and Kernel3 min readHow to Create a Shell Script in linux7 min readShell Scripting - Different types of Variables4 min readBash Scripting - Introduction to Bash and Bash Scripting12 min readBash Script - Define Bash Variables and its types12 min readShell Scripting - Shell Variables6 min readBash Script - Difference between Bash Script and Shell Script4 min readShell Scripting - Difference between Korn Shell and Bash shell3 min readShell Scripting - Interactive and Non-Interactive Shell3 min readShell Script to Show the Difference Between echo â$SHELLâ and echo â$SHELLâ4 min readLinux Administrator SystemWhat is Linux System Administration?6 min readBeginner's Guide to Linux System Administration5 min readHow to Monitor System Usage, Outages and Troubleshoot Linux Servers6 min readLinux - Systemd and its Components3 min readBoot Process with Systemd in Linux3 min readHow to Control Systemd Services on Remote Linux Server2 min readHow to Start, Stop and Restart Services in Linux Using systemctl Command9 min read My Profile ${profileImgHtml} My Profile Edit Profile My Courses Join Community Transactions Logout Like