Home

TTYs

TTY stands for teletypewriter, originally a mechanical device that could print and receive text over a communications line. In computing, the term has broadened to refer to any device or interface that provides character-based input and output for a program. Physical TTYs included early electromechanical terminals and serial line consoles; today the term also covers software terminals, which simulate a TTY for text terminals.

Historically, teletypewriters connected to mainframes and minicomputers via serial lines. As display terminals emerged, they replaced

In Unix-like systems, a TTY can be a physical serial device (such as /dev/ttyS0), a virtual console,

Modern usage includes serial console access to routers and embedded devices, terminal emulators within desktop environments,

paper
printing
with
video
screens
but
retained
the
same
character-oriented
communication
model.
In
Unix
and
Unix-like
systems,
TTY
was
repurposed
as
a
generic
term
for
terminal
devices,
with
devices
named
/dev/tty*,
and
a
process's
controlling
terminal.
or
a
pseudo-terminal
pair
(master
and
slave)
used
by
terminal
emulators.
The
system's
terminal
driver
handles
line
discipline,
which
controls
input
editing,
echoing,
and
special
characters.
Applications
access
TTYs
through
standard
streams;
the
termios
API
allows
configuring
modes
(canonical
vs
raw),
input
processing,
and
signal
handling.
The
controlling
terminal
is
the
TTY
associated
with
a
session,
typically
managed
by
login
or
an
SSH
session
via
a
pty.
and
remote
access
through
SSH.
Pseudo-terminals
enable
programs
to
run
with
interactive
input/output
in
situations
where
no
physical
terminal
is
present.
TTYs
remain
a
core
abstraction
for
text-based
interaction
in
multi-user
systems
and
programming
environments.