[ About | Licence | Contacts ]
Written by Oleksandr Gavenko (AKA gavenkoa), compiled on 2020-11-21 from rev ebbf146d86c1+.



C0 and C1 control codes
ANSI escape sequences

Check terminal capabilities.

$ infocmp -1 xterm
$ infocmp -1L xterm    # print long name

$ tput -Txterm colors
$ tput -Txterm blink

Print highlighted word:

$ h=`tput smso`
$ n=`tput rmso`
$ echo ${h}xxx${n}

Old hardware terminal.


VT100 is a video terminal that was made by Digital Equipment Corporation (DEC). It was introduced in August 1978. Its detailed attributes became the de facto standard for terminal emulators.

The control sequences used by the VT100 family are based on the ANSI X3.64 standard, later ECMA-48 and ISO/IEC 6429.

The VT101 and VT102 were cost-reduced non-expandable follow-on products, with the VT102 including the AVO and serial printer port options of the VT100.

In 1983, the VT100 was replaced by the more-powerful VT200 series terminals such as the VT220.

X window pseudo terminal.


Luit is a filter that can be run between an arbitrary application and a UTF-8 terminal emulator. It will convert application output from the locale's encoding into UTF-8, and convert terminal input from UTF-8 into the locale's encoding.


$ luit -encoding 'ISO 8859-1' emacs -nw

Capture terminal session

stript & ttyrec record byte streams together with timestamps.

stript & ttyrec are not avaialble in Cygwin.

GNU Screen is capable to log terminal output to a file (literary, without timestamps) and available in Cygwin:

With script utility:

$ script out.file
sh# ....
$ less out.file

Wikipedia articles:

Begins/ends logging of the current window to the file screenlog.n in the window’s default directory, where n is the number of the current window.

Installing terminal utilities

For Cygwin:

setup.exe -p ncurses
apt-cyg install ncurses