Friends who often use command lines such as Putty or xterm to control Linux systems may encounter problems like mine: When you press ctrl+s, the command line does not respond at all. Then close the window and reopen it, which is very uncomfortable, and now we're going to solve the problem.
As long as the first editor you use is not vim, or a friend of Emacs, the most frequently used shortcuts in the editing process are probably ctrl+s. And for those who often use putty or xterm to control Linux, Unix systems, I'm afraid I often encounter the same problem, instinctively pressed the ctrl+s, found that the command line is completely unresponsive. Helpless, you can only reopen the window and reopen the new command line interface.
Each time you reopen the command line, you need to first connect to the server, kill the programs that were started, and then execute them again.
In fact, this is because Ctrl+s has started Xoff (Turn off flow control). This will allow the terminal to accept the key operation normally, but will not do any output, feel like the command line does not respond to the same.
This article will provide you with three major solutions:
An immediate solution
A permanent solution
Stone Solutions
An immediate solution
Direct ctrl+q, open flow Control (XON). If you do some other keystrokes before the ctrl+q operation, you should be able to see the output again at the terminal.
A permanent solution
You can prevent Ctrl+s commands from sending Xoff directly in. bashrc.
Add the following two lines to your. BASHRC (you can see more options for man Stty):
Stty Ixany
Stty Ixoff-ixon
Stone Solutions
In fact, we can really let Ctrl+s in vim to save the file:
. Modifications in the BASHRC
Stty Ixany
Stty Ixoff-ixon
Stty Stop undef
Stty start undef
. VIMRC, Ctrl+s Save the current file
Map:w
Imap:wa