Unix-like systems In the past,
Unix and
Unix-like systems used serial port devices such as
RS-232 ports, and provided
device files for them. With terminal emulators these device files are themselves emulated by a pair of
pseudoterminal devices. These in turn emulate a physical port/connection to the host computing endpoint – hardware provided by operating system APIs, or software such as
rlogin,
telnet or
SSH, among others. In Linux systems, for example, these would be (for the master side) and (for the slave side) pseudoterminal devices respectively. There are also special
virtual console files like /dev/console. In text mode, writing to the file displays text on the virtual console and reading from the file returns text the user writes to the virtual console. As with other
text terminals, there are also special
escape sequences,
control characters and
functions that a program can use, most easily via a library such as
ncurses. For more complex operations, the programs can use console and terminal special
ioctl system calls. One can compare devices using the patterns vcs ("virtual console screen") and vcsa ("virtual console screen with attributes") such as /dev/vcs1 and /dev/vcsa1. Some terminal emulators also include escape sequences for configuring the behavior of the terminal to facilitate good interoperation between the terminal and programs running inside of it, for example to configure
paste bracketing. The virtual consoles can be configured in the file /etc/inittab read by
init—typically it starts the text mode
login process
getty for several virtual consoles.
X Window System can be configured in /etc/inittab or by an
X display manager. A number of
Linux distributions use
systemd instead of
init, which also allows virtual console configuration.
CLI tools Typical Linux system programs used to access the virtual consoles include: • to switch the current virtual console • to run a program on a new virtual console • to close a currently unused virtual console
Local echo Terminal emulators may implement a
local echo function, which may
erroneously be named "
half-duplex", or still slightly incorrectly "echoplex" (which is formally an
error detection mechanism rather than an input display option).
Line-at-a-time mode/Local editing Terminal emulators may implement local editing, also known as "line-at-a-time mode". This is also mistakenly referred to as "
half-duplex". In this mode, the terminal emulator only sends complete lines of input to the host system. The user enters and edits a line, but it is held locally within the terminal emulator as it is being edited. It is not transmitted until the user signals its completion, usually with the key on the keyboard or a "send" button of some sort in the user interface. At that point, the entire line is transmitted. Line-at-a-time mode implies local echo, since otherwise the user will not be able to see the line as it is being edited and constructed. However, line-at-a-time mode is independent of echo mode and does not
require local echo. When entering a password, for example, line-at-a-time entry with local editing is possible, but local echo is turned off (otherwise the password would be displayed). The complexities of line-at-a-time mode are exemplified by the line-at-a-time mode option in the telnet protocol. To implement it correctly, the
Network Virtual Terminal implementation provided by the terminal emulator program must be capable of recognizing and properly dealing with "interrupt" and "abort" events that arrive in the middle of locally editing a line.
Synchronous terminals In asynchronous terminals data can flow in any direction at any time. In
synchronous terminals a protocol controls who may send data when.
IBM 3270-based terminals used with
IBM mainframe computers are an example of
synchronous terminals. They operate in an essentially "screen-at-a-time" mode (also known as
block mode). Users can make numerous changes to a page, before submitting the updated screen to the remote machine as a single action. Terminal emulators that simulate the 3270 protocol are available for most operating systems, for use both by those administering systems such as the
z9, as well as those using the corresponding applications such as
CICS. Other examples of synchronous terminals include the
IBM 5250,
ICL 7561,
Honeywell Bull VIP7800 and
Hewlett-Packard 700/92.
Virtual consoles Virtual consoles, also called virtual terminals, are emulated
text terminals, using the keyboard and monitor of a personal computer or workstation. The word "text" is key since virtual consoles are not GUI terminals and they do not run inside a graphical interface. Virtual consoles are found on most
Unix-like systems. They are primarily used to access and interact with servers, without using a graphical desktop environment. ==See also==