UNIX/LINUX Command – tset

March 2, 2019



tset, reset—Terminal initialization


tset [-IQrs] [-t] [-e ch] [-i ch] [-k ch] [-m mapping] [terminal]
tset -h
tset -V
reset [-IQrs] [-t] [-e ch] [-i ch] [-k ch] [-m mapping] [terminal]
reset -h
reset -V


tset initializes terminals. tset first determines the type of terminal that you are using. This determination is done as follows, using the first terminal type found:

  • The terminal argument specified on the command line
  • The value of the TERM environmental variable
  • The terminal type associated with the standard error output device in the /etc/ttytype file
  • The default terminal type, unknown

If the terminal type was not specified on the command line, the -m option mappings are then applied (see the following section, “Options,” for more information). Then, if the terminal type begins with a question mark (?), the user is prompted for confirmation of the terminal type. An empty response confirms the type, or, another type can be entered to specify a new type. After the terminal type has been determined, the termcap entry for the terminal is retrieved. If no termcap entry is found for the type, the user is prompted for another terminal type.

After the termcap entry is retrieved, the window size, backspace, interrupt, and line kill characters (among many other things) are set and the terminal and tab initialization strings are sent to the standard error output. Finally, if the erase, interrupt, and line kill characters have changed, or are not set to their default values, their values are displayed to the standard error output.

When invoked as reset, tset sets cooked and echo modes, turns off cbreak and raw modes, turns on newline translation and resets any unset special characters to their default values before doing the terminal initialization described above. This is useful after a program dies leaving a terminal in an abnormal state. Note, you may have to type <LF>reset<LF> (the line-feed character is normally control-J) to get the terminal to work, as carriage-return may no longer work in the abnormal state. Also, the terminal will often not echo the command.


The options are as follows:

Options Description
-t The terminal type is displayed to the standard output, and the terminal is not initialized in any way.
-e Set the erase character to ch.
-I Do not send the terminal or tab initialization strings to the terminal.
-i Set the interrupt character to ch.
-k Set the line kill character to ch.
-m Specify a mapping from a port type to a terminal. See the following section, “Setting the Environment,” for more information.
-r Print the terminal type to the standard error output.
-s Print the sequence of shell commands to initialize the environment variables COLUMNS, LINES, TERM, and TERMCAP to the standard output.
Q Don’t display any values for the erase, interrupt, and line kill characters.
-w Force setting of display size as defined in /etc/termcap file.
-h Print short usage message.
-V Print version number.

The arguments for the -e, -i, and -k options may either be entered as actual characters or by using the hat notation, for example, control-h may be specified as ˆ H or ˆ h.

Satish Kumar

Satish Kumar

I am Satish Kumar, Founder of LinuxConcept. Linux and F.O.S.S enthusiast, love to work on open source platform and technologies.

Related Posts

UNIX/LINUX Command – rsync

UNIX/LINUX Command – rsync

NAME rsync – a fast, versatile, remote (and local) file-copying tool rsync Command SYNOPSIS Local: rsync [OPTION…] SRC… [DEST] Access via remote shell:Pull: rsync [OPTION…] [USER@]HOST:SRC… [DEST]Push: rsync [OPTION…] SRC… [USER@]HOST:DEST Access via rsync...

UNIX/LINUX Command – strip

UNIX/LINUX Command – strip

NAME strip—Discard symbols from object files. SYNOPSIS strip [ -Fbfdname|–target=bfdname ] [ -Ibfdname|–input-target=bfdname ] [ -Obfdname|–output-target=bfdname ] [-Rsectionname|–remove-section=sectionname ] [ -s|–strip-all ] [-S|-g|–strip-debug ][-x|–discard-all...

UNIX/LINUX Command – expand

UNIX/LINUX Command – expand

NAME expand—Convert tabs to spaces SYNOPSIS expand [–tab1[,tab2[,…]]] [–t tab1[,tab2[,…]]] [–i] [—tabs=tab1[,tab2[,…]]] [–initial] [–help] [–version] [file…] DESCRIPTION This manual page documents the GNU version of expand. expand writes the contents of each given...



Submit a Comment

Your email address will not be published. Required fields are marked *

8 − 2 =

News & Updates

Join Our Newsletter