Bash shell becomes inactive on Ctrl+S
Posted October 9th, 2008 in Linux/Unix/BSD
If you've ever accidentally hit Ctrl+S in the Bash shell it appears to come inactive and no matter what you do no output is echoed and nothing appears to be happening. This post looks at how to make the shell active again.
The Ctrl+S shortcut key sequence activates XOFF which is used to pause the sending of data etc (read more here at Wikipedia about software flow control). In the Bash shell this buffers all your commands and won't run them until you send XON which is done with Ctrl+Q.
I only learnt about this a few days ago when I accidentally pressed Ctrl+S while doing something on one of my webservers - I was meaning to press Ctrl+D to logout which is the only reason I knew which keystroke I had hit instead. It had baffled me years ago why my Bash shell suddenly became unresponsive when I'd hit what appeared to be some random keystroke combination. When it happened to me a few days ago I decided to work out why it does this and what the solution is. I remember in the past having to kill my CLI session because I didn't know what else to do.
So in summary, it's Ctrl+S which suspends the output and you need to hit Ctrl+Q to resume output again.
Related posts:
- Run scripts at system startup on Linux (Monday, January 26th 2009)
- Run a cron command every 15 minutes (Thursday, October 30th 2008)
- Sysmon init script (Sunday, October 5th 2008)
- Modifying the Linux Grub boot loader's options (Saturday, April 5th 2008)
Share or Bookmark
Share or Bookmark this page using the following services. You will need to have an account with the selected service in order to post links or bookmark this page.
Subscribe or Follow
Subscribe via RSS or email, or follow me on Facebook or Twitter below. The RSS icon takes you through to Feedburner where you can select the service or application to use.
