As many have experienced, ctrl+s freezes (and ctrl+q unfreezes) the terminal because of software flow control (XON/XOFF flow control) and you can disable it as mentioned in the accepted answer.
Although I can't say I've really intentionally used the feature, I do want the option to be able to pause a fast moving stream of terminal text, so I didn't want to completely disable it.
So instead of turning it off, I rebound the xoff function by placing the following in my .bashrc
stty stop '^P'
Which binds xoff to ctrl+p (and ctrl+q still unfreezes). I used "p" for "pause" and this does obscure the bash previous command function previous-history
. Personally I always use the up arrow key for that so it doesn't matter to me, but you could choose a different key.
This automatically frees up ctrl+s for forward-search-history
stty -ixon
). – TallouCtrl+S
before trying the command, or by some other key combination, or who knows what. – Hagy