RUNGETTY(8)
π RUNGETTY β the rungetty(8) situation π
okay bestie, so you found yourself in section 8 of the Linux Programmer's Manual, which is where the system admin girlypops live. this one's about rungetty, and ngl she's kind of a legend: a minimal console getty that can run literally any process. any. one. π
β¨ NAME β¨
rungetty β a minimal console getty that can run any process π
πΈ SYNOPSIS πΈ
rungetty [--noclear] [--long-hostname] [-u username] [-g group] [-w
path] [-n priority] [--prompt [=string]] [-d n] [--autologin username]
tty [--] [command] [arguments]
π¦ DESCRIPTION π¦
So rungetty is a getty made for virtual consoles, and her whole thing β her main character energy, if you will β is that she can run any program, not just login(1). like, she's not gonna be pigeonholed.
She's based on mingetty(8), and just like her ancestor, rungetty is not suitable for serial use. fr fr. both the author and the author of mingetty(8) say: for serial stuff, go use mgetty(8) instead. π«Ά
That said, she is super useful for keeping programs running at all times β think stuff like telnet(1), just vibing there forever. and here's the tea: when she runs a program that isn't login, it gets executed as the user and group nobody, or as the user given by username and the group given by group if you specified those. π
π OPTIONS π
--noclearβ don't clear the screen before asking for the login name. (normally the screen does get cleared, so this is you saying "bestie leave my pixels alone") β¨--long-hostnameβ by default the hostname only gets printed up until the first dot. with this on, you get the full text fromgethostname()β the whole thing, no edits. π-uusername β by defaultrungettyruns programs asnobody. with this, she runs them as the user username. slay. π-ggroup β by defaultrungettyruns as the groupnobody. this lets you tell her to run programs as the group group. π--prompt [=string]β makesrungettywait for user input (usually anEnter) before executing the program. if string is given, that's what gets displayed. otherwise you get a default prompt. π-nn β thenicevalue of the specified program. π§-wpath β the working directory of the specified program. π-dn β specifying-dmakesrungettywait n seconds before running the specified program. β³--autologinusername β logs the specified user onto the console (normally/dev/tty1) when the system is first booted, without prompting for a username or password. okay so here's the whole lore:- when the autologin option is supplied,
rungettychecks that the controlling terminal is the console (normally/dev/tty1), that a reasonable username has been supplied, and that this is the first autologin request since the system booted. - if all of those conditions are met, a request for an unauthenticated login gets passed to the login program. otherwise, a normal interactive login happens instead.
- the login program may deny the request for an unauthenticated login. typically this happens when the user is
root, has a UID of0, or whenever a normal interactive login would be denied due to the access restrictions specified in thenologin,usertty, orsecurettyfiles. - only a single autologin request will be issued after a system boot. if the automated login request is denied, or if the user logs out,
rungettyreverts to performing normal interactive logins for all subsequent login requests. no second chances, periodt. π
- when the autologin option is supplied,
--β tellsrungettythere are no more options to parse. useful for passing arguments with a-in them to the external program. π
π ARGUMENTS π
- tty β name of the tty to run on.
- command β runs the specified command. she searches for command in
/bin,/usr/bin,/usr/ucb,/usr/local/binif the complete pathname and filename aren't given. π - [arguments] β command line arguments to pass to command.
π ISSUE ESCAPES π
rungetty recognizes these escape sequences, which might be embedded in the /etc/issue file. little magic spells, basically β¨
\dβ insert current day (localtime),\lβ insert line on whichrungettyis running,\mβ inserts machine architecture (uname -m),\nβ inserts machine's network node hostname (uname -n),\oβ inserts domain name,\rβ inserts operating system release (uname -r),\tβ insert current time (localtime),\sβ inserts operating system name,\uresp.\Uβ the current number of users which are currently logged in.\Uinserts"n users", whereas\uonly inserts"n".\vβ inserts operating system version (uname -v).
π₯ EXAMPLE π₯
in /etc/inittab, these lines:
r1:12345:respawn:/sbin/rungetty tty1
r2:2345:respawn:/sbin/rungetty tty2 telnet mail.foo.com
r3:2345:respawn:/sbin/rungetty tty3 -u support top
r4:2345:respawn:/sbin/rungetty tty4 -n 20 -w /etc rc5des
Would run a local login on /dev/tty1, a telnet(1) session to mail.foo.com on /dev/tty2, and top(5) on /dev/tty3. Note that telnet(1) is run as user nobody, while top(5) is run as user support, and start the program rc5des(5) at the lowest priority level with a current directory of /etc. π¦ look at her go!!
π§ FILES π§
/etc/issue, /var/run/utmp, /var/log/autologin.
π BUG REPORTS π
Please send all bug reports to jake@nodomainname.net.
π BUGS π
There are no known bugs.
(iconic behaviour honestly, we love a flawless queen πΈ)
π SEE ALSO π
π AUTHOR π
Copyright Β© 1999 Jakob Kaivo <jake@nodomainname.net>.
and that's the whole page bestie!! written by Jakob 'sparky' Kaivo on 04 February 1999, living in the RUNGETTY(8) corner of the Linux Programmer's Manual. go keep some weird program alive on a tty, you absolute legend π
π«Άβ¨
π¦ where this page comes from
- debian bookworm: rungetty 1.2-16.1+b1
- debian trixie: rungetty 1.2-16.3
- ubuntu jammy: rungetty 1.2-16.1
- ubuntu noble: rungetty 1.2-16.2
- ubuntu questing: rungetty 1.2-16.3
- ubuntu resolute: rungetty 1.2-17 Β· GPL-2.0-or-later
- ubuntu stonking: rungetty 1.2-17 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms