Table of Contents

OS - Terminal (Emulator) (Term|tty)

About

A terminal is a media using a fixed-pitch character grid such as:

The term terminal cover all terminals:

A terminal introduces the context of output where to draw and/or write data.

This article talks about text terminal.

Features

Example:

Terminal Emulator

A terminal emulator, terminal application, term, or tty (teletypewriter), is a program that emulates a terminal.

It refers generally to a wrapper program which runs a shell.

They are a property of the terminal application.

All software terminal are terminal emulator because they are not implemented via a hardware but via software.

Xterm

Xterm (the default terminal emulator of Putty and MinTty)

cmd.exe

cmd.exe is the default console window of Windows.

It:

Virtual Terminal (VT)

Virtual Terminal (VT) series (VTxxx)

Many terminal emulators have been developed for terminals such as:

Level:

Other

wiki/List_of_terminal_emulators

Wrapper

Putty

Putty uses Xterm

MinTTY

mintty uses Xterm.

Mintty is the terminal of:

Text

The role of a text terminal (emulate process or not) is to interact with the user:

The terminal emulator must also handle terminal control commands, e.g., for resizing the screen.

A terminal window allows the user access to a text terminal and all its applications such as:

When user starts terminal, it runs generally by default a OS Shell or a console application (cli).

Locality

The terminal may be running:

Local

A local terminal is also known as a console window.

On Unix-like operating systems, it is common to have one or more terminal windows connected to the local machine.

Remote

Remote terminals connect to remote hosts to run applications remotely.

The terminal may run on a remote machine via:

Escape sequences

Terminals usually support a sequence of characters called an escape sequences for controlling color, cursor position, etc.

Color

See Terminal - Color

Terminal emulator

Local login

Remote Login

Remote login handlers such as ssh and telnet servers play the same role but communicate with a remote user instead of a local one.

With session context

Screen and Tmux are used to add a session context to a pseudo terminal. For example, it provides terminal persistence allowing to disconnect from one computer and connect later on from another computer on the net.

the Linux console behaves almost like a vt100 terminal

Pseudo-Terminal

If not, screen implements a superset of vt100 and vt100 is universal

pseudo-terminal normal login session

if the current session has no tty

Multiplexer (Multiplexing)

A multiplexer (or multiplexing):

They let you:

List:

Note that terminal/editor may have windows support:

Tools

Draw plot in the terminal

https://github.com/red-data-tools/YouPlot

FAQ

What is the TERM environment variable?

The environment variable TERM 1) tells applications the name of a terminal description to read from the terminfo(5) database 2)

The value of TERM tells an application program what terminal you are using.

Each description consists of a number of named capabilities which tell applications what to send to control the terminal.

For example, the cup capability contains the escape sequence used to move the cursor up.

It is important that TERM points to the correct description for the terminal an application is running in - if it doesn't, applications may misbehave.

Example:

echo $TERM

According to the SSH RFC 3), the TERM variable is set when initializing the SSH connection. This is set initially, regardless of AcceptEnv.

Documentation / Reference