Linux reset Command
The Linux reset command is essentially the same as tset, and its purpose is to set the terminal state. Generally, this command automatically determines the current terminal type from environment variables, command line, or other configuration files. If the specified type is '?', the program will prompt the user to input the terminal type.
Since this program resets the terminal to its original state, it is not only used during login but also when the system terminal enters an abnormal state due to improper program execution. You can use it to reset the terminal. For example, accidentally using the cat command on a binary file into the terminal often results in the terminal no longer responding to keyboard input or responding with strange characters. In such cases, 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: Displays the terminal type on the screen without performing the setup action. This command can be used to obtain the current terminal type.
-e ch: Sets the erase character to ch.
-i ch: Sets the interrupt character to ch.
-k ch: Sets the delete-line character to ch.
-I: Does not perform the setup action. If the -Q option is not used, the current values of erase, interrupt, and delete characters will still be displayed on the screen.
-Q: Does not display the values of erase, interrupt, and delete characters on the screen.
-r: Prints the terminal type on the screen.
-s: Sends the command used to set TERM in string format to the terminal, typically used in .login or .profile.
Example
Prompts the user to input a terminal type and sets the terminal to the default state for that type.
# reset ?
Sets the erase character to control-h.
# reset -e ^B
Displays the setup string on the screen.
# reset -s
Erase is control-B (^B).
Kill is control-U (^U).
Interrupt is control-C (^C).
TERM=xterm;