RIS — Reset to Initial State (full terminal reset)
Hard reset the terminal: clear screen + scrollback, reset every mode and SGR, home the cursor.
Byte forms
Every common string-literal form so you can paste-and-search either direction.
\x1bc\033c\ecESC c1b 63Description
Reset to Initial State. Two bytes — ESC (0x1b) followed by `c` (0x63) — with no CSI introducer, no parameters. The terminal does the moral equivalent of a power cycle: clears the screen and (on most terminals) the scrollback, resets every SGR attribute and color, exits the alt screen, resets DEC private modes (auto-wrap on, cursor visible, mouse off, bracketed-paste off), resets character sets, and homes the cursor. This is what `reset(1)` and `tput reset` ultimately emit. Use it as a last-resort recovery when a crashed TUI has left the terminal in an unusable state — but be aware it also wipes scrollback in most modern terminals, which the gentler `\x1b[!p` (DECSTR, soft reset) does not.
Spec citation: ECMA-48 §8.3.105 (RIS) / xterm-ctlseqs (ESC c)
Examples
printf '\033c' # full reset; same as tput resetimport sys; sys.stdout.write('\x1bc')fmt.Print("\x1bc")process.stdout.write('\x1bc')printf("\x1bc");Terminal support
- xterm
- yes
- Linux console (fbcon)
- yes
- macOS Terminal.app
- yes
- iTerm2
- yes
- Windows Terminal
- yes
- cmd.exe / ConPTY
- partial
- kitty
- yes
- alacritty
- yes
- WezTerm
- yes
- Ghostty
- yes
- GNOME Terminal
- yes
- Konsole
- yes
- tmux
- no
- GNU screen
- no
| xterm | Linux console (fbcon) | macOS Terminal.app | iTerm2 | Windows Terminal | cmd.exe / ConPTY | kitty | alacritty | WezTerm | Ghostty | GNOME Terminal | Konsole | tmux | GNU screen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| yes | yes | yes | yes | yes | partial | yes | yes | yes | yes | yes | yes | no | no |
Related sequences
In the family cookbook
ESC cookbook · 1. Hard reset vs. soft reset — `\x1bc` (RIS) and `\x1b[!p` (DECSTR)