reset command in Linux system is used to initialize the terminal. This is useful once a program dies leaving a terminal in an abnormal state. Note that you may have to type reset to get the terminal up and work, as carriage-return may no longer be work in the abnormal state. Also, the terminal will often not going to echo the command.
reset [-IQVcqrsw] [-] [-e ch] [-i ch] [-k ch] [-m mapping] [terminal]
Example: Suppose we have a terminal screen with a bunch of commands written on the screen and when we will use the reset command then we will have initialized terminal screen as shown below:
Before using reset command
After using reset command
- –help: It will print the general syntax of the command along with the various options that can be used with the reset command as well as gives a brief description about each option.
- reset -c: Sets the control characters and modes.
- reset -e: This option set the erase character to ch.
- reset -l: This option do not send the terminal or tab initialization strings to the terminal.
- reset -i: This option set the interrupt character to ch.
- reset -k: This option set the line kill character to ch.
- reset -m: This option specify a mapping from a port type to a terminal.
- reset -Q: This option do not display any values for the erase, interrupt and line kill characters. Normally,tset displays the values for the control characters which is differ from the system’s default values.
- reset -q: The terminal type is been displayed to the standard output, and the terminal is not been initialized in any way. The option ‘-’ by itself is itself equivalent but archaic.
- reset -r: This option Prints the terminal type to the standard error output.
- reset -s: This option prints the sequence of shell commands to initialize the environment variable TERM to the standard output.
- reset -V: This option reports the version of ncurses which was used in this program, and exits.
- reset -w: This option resizes the window to match the size deduced via setupterm. Normally this has no effect, unless setupterm is not been able to detect the window size.
- Reset a lost Linux administrative password and Explanation
- How to reset the root password of RedHat/CentOS Linux
- 'IPCS' command in Linux with examples
- select command in Linux with examples
- Sed Command in Linux/Unix with examples
- ZIP command in Linux with examples
- SORT command in Linux/Unix with examples
- Cat command in Linux with examples
- Head command in Linux with examples
- Tail command in Linux with examples
- wc command in Linux with examples
- tar command in Linux with examples
- atrm command in Linux with examples
- bc command in Linux with examples
- AWK command in Unix/Linux with examples
- tr command in Unix/Linux with examples
- mv command in Linux with examples
- Paste command in Linux with examples
- comm command in Linux with examples
- cmp Command in Linux with examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.