Open In App

reset command in Linux with Examples

Last Updated : 23 Jan, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

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. Syntax:

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 Options:

  • –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,test 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.

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads