GNU/Linux, Open Source, Cloud Computing, DevOps and more...

Unlock Linux command line after pressing Ctrl+s in Bash

No comments

Ctrl+SSince the key combination Control+s is widely used as a shortcut to save files in GUI applications such as text editors, image editors, web browsers, etc. sometimes you are betrayed by your subconscious when you are working from the Linux command line and you use that same key combination when you are for example editing a Vim document when trying to save it. Then you notice that no key answers, the shell is locked and you can no longer do anything else in it.  Even worse, you get a cold sweat because you can’t continue editing your document and you can’t save the changes.

Don’t panic, don’t panic. The key combination Ctrl+s that you pressed only pauses the flow control (XOFF), that is, your terminal will continue accepting inputs from keyboard, but it will not display any output, giving the impression that it is blocked, frozen, that it hung up. The only thing you have to do to resume flow control (XON) is to press the Ctrl+q combination on your keyboard and everything will be back to normal.

DEC_VT100_terminal

Terminal DEC VT100

These escape sequences have their origin in the old RS-232 terminals that were used to connect to large mainframe computers. Since what we use now to execute commands in Linux are emulators of those terminals, this behavior is not really something that only affects Bash, but also other shells such as sh, Zsh or Csh.

 

 

About the author

Daniel López Azaña
Freelance AWS Cloud Solution Architect & Linux Sysadmin

Entrepreneur, a generator of ideas and restless mind. Passionate about new technologies, especially Linux systems and Open Source Software. I also like to write about Technology News, Cloud Computing, AWS, DevOps, DevSecOps, System Security, Web Development and Programming, SEO, Science, Innovation, Entrepreneurship, etc.

DanielUnlock Linux command line after pressing Ctrl+s in Bash

Related Posts

Leave a Reply

Your email address will not be published.