Linux: Ctrl+s Freeze vim

By Xah Lee. Date: . Last updated: .

Ctrl+s → freeze screen.

Ctrl+q → unfreeze screen.

These are ancient keys from 1980s or earlier. They still work in many boot screen. They are used to send a signal to the device to tell it to stop receiving transmission.

1702111DC1device control 1Ctrl+qoften used for start transmission XON.
1902313DC3device control 3Ctrl+soften used for stop transmission XOFF (X is short for transmission)

[see ASCII Characters]

To turn it off, put this in your bash init file:

stty ixoff -ixon

[see Bash Init, .bashrc .profile .bash_profile]

Here's a Ubuntu linux stty default setup.

# stty -a
speed 38400 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = <undef>; kill = <undef>; eof = ^D; eol = <undef>; eol2 = <undef>;
swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel
opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke

For detail of other terminal control sequence keys, see: Linux: Terminal Control Sequence Keys

Linux Terminal