Linux reset command
The Linux reset command is actually the same command as tset; its purpose is to set the state of the terminal. Generally, this command automatically determines 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 enter the terminal type.
Because this program restores the terminal to its original state, besides being used at login, you can also use it to reset the terminal when it enters a strange state due to abnormal program execution. For example, if you accidentally cat a binary file to the terminal, the terminal often stops responding to keyboard input or responds 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 Display the terminal type on screen without actually setting it. 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 kill-line character to ch
- -I Do not perform any setting action; if the -Q option is not used, the current values of the erase, interrupt, and kill characters will still be displayed on screen.
- -Q Do not display the values of the erase, interrupt, and kill characters on screen.
- -r Print the terminal type on screen.
- -s Send the commands for setting TERM to the terminal as a string, typically used in .login or .profile.
Example
Have the user enter a terminal type and set the terminal to that type's default state
# reset ?
Set the erase character to control-h
# reset -e ^B
Display the setup string on screen
# reset -s
Erase is control-B (^B).
Kill is control-U (^U).
Interrupt is control-C (^C).
TERM=xterm;
Linux Command Reference