← 返回命令列表

Linux command

reset 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Reinitialize

reset

Display

reset -q

Reset and print shell commands

reset -s

Reset without sending

reset -I

说明

reset reinitializes the terminal to its default state. When invoked as reset (as opposed to tset), it sets cooked and echo modes, turns off cbreak and raw modes, turns on newline translation, and resets unset special characters to their default values before sending terminal initialization strings. This is useful when the terminal becomes garbled from viewing binary files or other corruption. The command reads terminfo data for the terminal type (from TERM environment variable) and sends appropriate initialization sequences. If neither -c nor -w is given, both are assumed.

参数

-q
Display terminal type without reinitializing
-c
Set control characters and modes
-e _ch_
Set erase character to _ch_
-i _ch_
Set interrupt character to _ch_
-k _ch_
Set kill character to _ch_
-I
Do not send terminal initialization strings
-Q
Do not display values for erase, interrupt, and line kill characters
-r
Print terminal type to stderr
-s
Print shell commands to set TERM
-V
Report ncurses version and exit
-w
Resize the window to match the size deduced via setupterm
-m _mapping_
Specify a mapping from a port type to a terminal

FAQ

What is the reset command used for?

reset reinitializes the terminal to its default state. When invoked as reset (as opposed to tset), it sets cooked and echo modes, turns off cbreak and raw modes, turns on newline translation, and resets unset special characters to their default values before sending terminal initialization strings. This is useful when the terminal becomes garbled from viewing binary files or other corruption. The command reads terminfo data for the terminal type (from TERM environment variable) and sends appropriate initialization sequences. If neither -c nor -w is given, both are assumed.

How do I run a basic reset example?

Run `reset` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -q do in reset?

Display terminal type without reinitializing