Linux reset command
The Linux reset command is actually the same command as tset, and its purpose is to set the state of the terminal. Generally speaking, this command will automatically determine the current terminal type from environment variables, the command line, or other configuration files. If the specified type is '?', the program will ask the user to input the terminal type.
Because this program resets the terminal to its original state, in addition to using it at login, when the system terminal enters some strange state due to abnormal program execution, you can also use it to reset the terminal. For example, if you accidentally send a binary file to the terminal using the cat command, the terminal may often stop responding to keyboard input, or it may respond with some strange characters. At this point, 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 setting actions. This command can be used to obtain the current terminal type.
- -e ch Set the erase character to ch
- -i ch Set the interrupt character to ch
- -k ch Set the delete-line character to ch
- -I Do not make any settings. If the -Q option is not 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 commands used to set TERM to the terminal in string form, usually used in .login or .profile.
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 strings 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;Other extensions
Linux Command Encyclopedia