OS - Terminal (Emulator) (Term|tty)

> Operating System - Kernel (Windows, Unix, Linux)

1 - About

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

  • teletypes,
  • portable devices with limited display capabilities
  • bank terminal

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.

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

Advertising

3 - features

Example:

  • Native Windows user interface with a simple options dialog.
  • Easy copy & paste.
  • Drag & drop of text, files and folders.
  • Ability to open files and URLs with Ctrl+click.
  • Comprehensive character encoding support, including UTF-8.
  • Wide character display and Windows IME support.
  • Window transparency, including glass effect on Vista and 7.
  • 256 colours.
  • Fullscreen mode.
  • Options stored in a text file. No registry entries.
  • Small program size and quick scrolling.

4 - Text

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

  • to feed text input to the master pseudo-device for use by the shell (which is connected to the slave pseudo-device)
  • and to read text output from the master pseudo-device and show it to 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).

Advertising

5 - Locality

The terminal may be running:

  • either on the same machine: local
  • or on a different one remote

5.1 - 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.

5.2 - Remote

Remote terminals connect to remote hosts to run applications remotely.

The terminal may run on a remote machine via:

6 - List

List_of_terminal_emulators

Advertising

7 - Escape sequences

Terminals usually support a set of escape sequences for controlling color, cursor position, etc.

An escape sequence is a series of characters used to change the state of computers and their attached peripheral devices. These are also known as control sequences, reflecting their use in device control.

Console escape and control sequences for the Linux terminal can be found in the man page: console_codes

8 - Terminal emulator

8.1 - Local login

  • GNOME Terminal,
  • Konsole
  • and Mac OS X Terminal.

8.2 - 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.

8.3 - 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

PuTTY is an example of a virtual terminal.

Virtual Terminal (VT) series:

Many terminal emulators have been developed for terminals such as:

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

pseudo-terminal normal login session

if the current session has no tty

9 - Documentation / Reference

os/terminal.txt · Last modified: 2019/05/27 14:12 by gerardnico