rungetty - a minimal console getty that can run any process
[--noclear] [--long-hostname] [-u username
] [-w path
] [-n priority
] [--prompt [=string]] [-d
] [--autologin username
[--] [command] [arguments]
is a getty for use on virtual consoles which has the ability to
run any program, not just login
(1). Like mingetty
(8), on which
is based, rungetty
isn't suitable for serial use. Both
I and the author of mingetty
(8) recommend mgetty
(8) for that. It
is useful, though, for keeping programs such as, say, telnet
running at all times. When running a program other than login, it is executed
as the user and group nobody
, or the user specified by username
and group specified by group
- Do not clear the screen before prompting for the login name
(the screen is normally cleared).
- By default the hostname is only printed until the first
dot. With this option enabled, the full text from gethostname() is
- -u username
- By default, rungetty runs programs as nobody. With this
option, it runs as the user username.
- -g group
- By default, rungetty runs as the group nobody. This option
allows you to tell rungetty to run programs as the group
- --prompt [=string]
- This option causes rungetty to wait until user input
(usually an 'Enter') before executing the program. If string is
specified, it will be displayed. Otherwise, a default prompt will be
- -n n
- ´nice´ value of specified program.
- -w path
- Working directory of specified program.
- -d n
- Specifying -d will make rungetty wait n seconds
before running the specified program.
- --autologin username
- Log the specified user onto the console (normally
/dev/tty1) when the system is first booted without prompting for a
username or password.
- When the autologin option is supplied, rungetty will
check 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 has booted. If all of
these conditions have been met, a request for an unauthenticated login is
passed to the login program. Otherwise, a normal interactive login
- The login program may deny the request for an
unauthenticated login. Typically this will happen when the user is root,
has a UID of 0, or whenever a normal interactive login would be denied due
to the access restrictions specified in the nologin,
usertty, or securetty files.
- 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, rungetty will revert to performing normal interactive logins
for all subsequent login requests.
- Tells rungetty that there are no more options to
parse, useful for passing arguments with a - in them to the external
- Name of the tty to run on.
- Runs specified command. Searches for command in
/bin, /usr/bin, /usr/ucb, /usr/local/bin if
the complete pathname and filename are not given.
- Command line arguments to pass to command.
recognizes the following escape sequences which might be
embedded in the /etc/issue
- insert current day (localtime),
- insert line on which rungetty is running,
- inserts machine architecture (uname -m),
- inserts machine's network node hostname (uname -n),
- inserts domain name,
- inserts operating system release (uname -r),
- insert current time (localtime),
- inserts operating system name,
- \u resp. \U
- the current number of users which are currently logged in.
\U inserts " n users", where as \u only inserts
- inserts operating system version (uname -v).
, these lines:
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
(1) session to
mail.foo.com on /dev/tty2
. Note that telnet
(1) is run as user nobody
(5) is run as user support
, and start the program
(5) at the lowest priority level with a current directory of
Please send all bug reports to email@example.com
There are no known bugs.
Copyright © 1999 Jakob Kaivo <firstname.lastname@example.org>.