English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Linux reset command

Linux Command大全

The Linux reset command is actually the same as the tset command, and its purpose is to set the terminal state. Generally speaking, this command will automatically determine the current terminal type from environment variables, command lines, or other configuration files. If the specified type is '?', the program will prompt the user to enter the terminal type.

Since this program will reset the terminal to its original state, it can also be used to reset the terminal when the system terminal enters some strange states due to the abnormal execution of the program. For example, if you accidentally use the cat command to enter the terminal with binary mode, the terminal may no longer respond to keyboard input or respond with some strange characters. In this case, you can use reset to restore the terminal to its original state.

Syntax

tset [-IQqrs] [-] [-e [ch]] [-i [ch]] [-k [ch]] [-m [mapping] [terminal]

Parameter Description:

  • -p  Display the terminal type on the screen but do not perform the setting action. This command can be used to get the current terminal type.
  • -e ch  Set the erase character to ch
  • -i ch  Set the interrupt character to ch
  • -k ch  Set the character to delete a line to ch
  • -I  Do not perform the setting action if no options are used -If Q is used, the current values of erase, interrupt, and delete characters will still be sent to the screen.
  • -Q  Do not display the values of erase, interrupt, and delete characters on the screen.
  • -r  Print the terminal type on the screen.
  • -s  Send the command used to set TERM in string format to the terminal, usually used in .login or .profile.

Online Examples

Let the user input a terminal type and set the terminal to the default state of that type

# reset ?

Set the erase character to control-h

# reset -e ^B

Display the string used for setting on the screen

# reset -s
Erase is control-B (^B).
Kill is control-U (^U).
Interrupt is control-C (^C).
TERM=xterm;

Linux Command大全