By reading in the username, agetty
can automatically adapt the tty settings like parity bits, character size, and newline processing. If you disable it (--skip-login
options), it needs to assume (possibly wrong) default settings.
There are several realpath
commands around.
The realpath
utility is a wrapper around the realpath
library functions and has been reinvented many times.
Debian used to maintain a realpath
package (separated from dwww
since woody) which hasn't changed except regarding packaging and documentation since 2001, but has now been phased out. This utility was deprecated because there are now more standard alternatives (GNU readlink
and soon GNU realpath
), but at the time, GNU utilities didn't even have readlink
at all. This implementation of realpath
supports a few options
to prevent symbolic link resolution or produce null-terminated output.
BusyBox also includes its own realpath
command (which takes no option).
GNU coreutils introduced a realpath
command in version 8.15 in January 2012. This is a compatible replacement for BusyBox's and Debian's realpath
, and also has many options in common with GNU readlink
.
realpath
has the same effect as readlink -f
with GNU readlink
. What distinguishes the two commands (or rather the various realpath
commands from readlink -f
) is the extra options that they support.
GNU realpath
is not deprecated; it has the opposite problem: it's too new to be available everywhere. Debian used to omit GNU realpath
from its coreutils
package and stick with its own realpath
. I don't know why, since GNU realpath
should be a drop-in replacement. As of Debian jessie and Ubuntu 16.04, however, GNU realpath
is used.
On Linux systems, at the moment, your best bet to canonicalize a path that may contain symbolic links is readlink -f
.
BSD systems have a readlink
command, with different capabilities from GNU readlink
. In particular, BSD readlink
does not have an option to canonicalize paths, it only traverses the symlink passed to it.
readlink
, incidentally, had the same problem — it was also invented many times (not adding this utility when symbolic links were added to Unix was a regrettable omission). It has now stabilized in several implementations with many incompatible flags (in particular BSD vs. GNU).
Best Answer
There was a program named
getty
in 1st Edition Unix. The BSDs usually have a program namedgetty
that is a (fairly) direct descendant of this. It (nowadays) reads/etc/ttys
for the database of configured terminal devices and/etc/gettytab
for the database of terminal line types (a line type being passed as an argument to thegetty
program).The Linux world has a collection of clones and reimplementations, as did minix before it.
agetty
was written by Wietse Venema, as an "alternative" to AT&T System 5 and SunOSgetty
, and ported to Linux by Peter Orbaek (who also providedsimpleinit
alongside it). It is suitable for use with serial devices, with either modems or directly connected terminals, as well as with virtual terminal devices.getty
anduugetty
is hard to find nowadays, but was an alternative toagetty
. (Thegetty-ps
package containing them both can still be found in SlackWare.)getty
andinit
for minix in 1990.mgetty
is another getty that is suitable for use with actual serial devices, and was designed to support "smart" modems such as fax-modems and voice-modems, not just "dumb" terminal-only modems.mingetty
was designed not to support serial devices, and generic getty functionality on any kind of terminal device. Rather, it is specific to virtual terminal devices and cuts out all of the traditional getty hooplah that is associated with modems and serial devices.fgetty
was derived frommingetty
, adjusted to use a C library with a smaller footprint than the GNU C library, and tweaked to include things like thecheckpasswd
mechanism.ngetty
was a rearchitecture of the whole getty mechanism. Instead ofinit
(directly or indirectly) knowing about the TTYs database and spawning multiple instances of getty, each to respond on one terminal, init spawns onengetty
process that monitors all of the terminals.