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.
- help Command in Linux with examples
- last command in Linux with Examples
- tee command in Linux with examples
- dc command in Linux with examples
- sum command in Linux with Examples
- cal command in Linux with Examples
- for command in Linux with Examples
- Cat command in Linux with examples
- rcp Command in Linux with examples
- rev command in Linux with Examples
- which command in Linux with examples
- cc command in Linux with Examples
- more command in Linux with Examples
- yes command in Linux with Examples
- let 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.