A terminal multiplexer is a
software application
Software is a set of computer programs and associated documentation and data. This is in contrast to hardware, from which the system is built and which actually performs the work.
At the lowest programming level, executable code consists ...
that can be used to
multiplex several separate
pseudoterminal
In some operating systems, including Unix and Linux, a pseudoterminal, pseudotty, or PTY is a pair of pseudo-device endpoints (files) which establish asynchronous, bidirectional communication ( IPC) channel (with two ports) between two or more pro ...
-based
login session
In computing, a login session is the period of activity between a user logging in and logging out of a (multi-user) system.
On Unix and Unix-like operating systems, a login session takes one of two main forms:
* When a textual user interface is ...
s inside a single terminal display,
terminal emulator
A terminal emulator, or terminal application, is a computer program that emulates a video terminal within some other display architecture. Though typically synonymous with a shell or text terminal, the term ''terminal'' covers all remote ter ...
window, PC/workstation
system console
One meaning of system console, computer console, root console, operator's console, or simply console is the text entry and display device for system administration messages, particularly those from the BIOS or boot loader, the kernel, from the i ...
, or remote
login session
In computing, a login session is the period of activity between a user logging in and logging out of a (multi-user) system.
On Unix and Unix-like operating systems, a login session takes one of two main forms:
* When a textual user interface is ...
, or to detach and reattach sessions from a terminal. It is useful for dealing with multiple programs from a
command line interface
A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
, and for separating programs from the session of the
Unix shell
A Unix shell is a command-line interpreter or shell that provides a command line user interface for Unix-like operating systems. The shell is both an interactive command language and a scripting language, and is used by the operating system t ...
that started the program, particularly so a remote process continues running even when the user is disconnected.
Features
A terminal multiplexer can be thought of as a
text version of graphical
window manager
A window manager is system software that controls the placement and appearance of windows within a windowing system in a graphical user interface. Most window managers are designed to help provide a desktop environment. They work in conjunct ...
s, or as a way of putting attach virtual terminals to any login session. It is a wrapper that allows multiple text programs to run at the same time, and provides features that allow the user to use the programs within a single interface productively.
; Persistence: Similar to
Virtual Network Computing
Virtual Network Computing (VNC) is a graphical desktop-sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer. It transmits the keyboard and mouse input from one computer to another, relaying the ...
, many terminal multiplexers allow the user to start applications from one computer, and then reconnect from a different computer and continue using the same application without having to restart it. This makes accessing the same session between different locations like work and home simple. These multiplexers generally provide terminal-agnostic functionality so that users can disconnect and reconnect using different terminal types, allowing applications to continue running without being aware of the change in terminals.
:Concretely, the multiplexer starts a session (with associated processes), and then either does not attach a terminal to it, or attaches a terminal but can subsequently detach it (for example if the network connection is dropped). Since the session does not end, the processes are not sent a "hangup" signal (
SIGHUP On POSIX-compliant platforms, SIGHUP ("signal hang up") is a signal sent to a process when its controlling terminal is closed. It was originally designed to notify the process of a serial line drop. SIGHUP is a symbolic constant defined in the head ...
) and are not terminated, so they continue running, and one can subsequently (re)attach a terminal to the session and continue interacting, or simply leave the session unattached.
; Multiple windows: Multiple terminal sessions can be created, each of which usually runs a single application. The windows are numbered, and the user can use the keyboard to switch between them. Some
GUI terminal emulators provide tabs or otherwise similar functionality to this. Each window has its own scroll-back buffer, so that output is captured even when the window isn't actively displayed, and that history can be saved even when migrating to another computer. Windows can be split-screened. While some text applications have this functionality built in, a terminal multiplexer allows any application to be split-screened alongside any number of other applications.
; Session Sharing: Terminal multiplexers allow multiple computers to connect to the same session at once, enabling collaboration between multiple users. The same computer can also be used to make multiple simultaneous connections, providing alternative functionality to screen-splitting, particularly for computers with multiple monitors.
Implementations
*
Byobu: A profile and configuration utility for GNU Screen and tmux.
* dvtm: Tiling window management for the console.
*
GNU Screen: the prototypical terminal multiplexer, first released in 1987
* mtm: billed as "perhaps the smallest useful terminal multiplexer in the world"
*neercs
neercs("screen" spelled backwards) is a GNU screen workalike. It supports window thumbnailing and graphical animated screensavers. It also supports 3D console switching (switching between consoles mapped to the faces of a cube) via the libcaca
ASCII art
ASCII art is a graphic design technique that uses computers for presentation and consists of pictures pieced together from the 95 printable (from a total of 128) character (computing), characters defined by the ASCII Standard from 1963 an ...
library.
* splitvt: split terminal utility.
*
TD/SMP TD/SMP, short for Terminal Device/Session Management Protocol, was a terminal multiplexer system introduced by DEC on their VT330/340 terminals in 1987. The terminal-side was referred to as SSU. TD/SMP allowed data from two separate host sessions ...
: introduced by
DEC on their
VT330/340 terminals, TD/SMP was proprietary and only widely supported by their own terminal servers
*
tmux
tmux is an open-source terminal multiplexer for Unix-like operating systems. It allows multiple terminal sessions to be accessed simultaneously in a single window. It is useful for running more than one command-line program at the same ti ...
: A modern GNU Screen workalike, released in 2007; it is
BSD-licensed, allows multiple panes (with optional
Xterm
In computing, xterm is the standard terminal emulator for the X Window System. It allows users to run programs which require a command-line interface.
If no particular program is specified, xterm runs the user's shell. An X display can sho ...
mouse support), and has a scriptable command interface. tmux aimed to allow the sharing of a single window between multiple terminals, while keeping the other windows in the same session entirely separate. tmux has been part of the
OpenBSD
OpenBSD is a security-focused operating system, security-focused, free and open-source, Unix-like operating system based on the Berkeley Software Distribution (BSD). Theo de Raadt created OpenBSD in 1995 by fork (software development), forking N ...
base system since 2009's version 4.6.
*
Twin
Twins are two offspring produced by the same pregnancy
Pregnancy is the time during which one or more offspring develops ( gestates) inside a woman's uterus (womb). A multiple pregnancy involves more than one offspring, such as with t ...
("Text mode WINdow environment"): a full-fledged
window manager
A window manager is system software that controls the placement and appearance of windows within a windowing system in a graphical user interface. Most window managers are designed to help provide a desktop environment. They work in conjunct ...
for text windows. Initially started as an
MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few oper ...
project, it was later ported to Linux.
See also
*
pkexec
Polkit (formerly PolicyKit) is a component for controlling system-wide privileges in Unix-like operating systems. It provides an organized way for non-privileged processes to communicate with privileged ones. Polkit allows a level of control ...
References
{{reflist