Daniel López Azaña

Theme

Social Media

Blog

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

Unlock Linux command line after pressing Ctrl+s in Bash

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 theflow 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.

Daniel López Azaña

About the author

Daniel López Azaña

Tech entrepreneur and cloud architect with over 20 years of experience transforming infrastructures and automating processes.

Specialist in AI/LLM integration, Rust and Python development, and AWS & GCP architecture. Restless mind, idea generator, and passionate about technological innovation and AI.

Related articles

fatrace command man page

Fatrace command: how to know in real time which processes are writing to a file

It is usually easy to know which process or processes are writing to a given file in Linux, since we either know its origin and its nature beforehand (for example the Apache access_log), or we can easily find it out with the fuser or lsof commands. However, sometimes it will happen that although we know the role and purpose of a file, there are so many applications accesing it simultaneously that it is very difficult to know which of them is the one that reads/writes the most or does so in a precise moment. Knowing this would be very useful to learn for example why a log file is growing excessively or which application is making an abusive use of system resources, either by mistake or intentionally.

June 23, 2017
linux-penguin-inside-a-box-tar-gz

15 most useful Linux commands for file system maintenance

One of the most common and tedious tasks of a sysadmin is to prevent file systems become completely full, because when a server runs out of space the consequences are unpredictable. Depending on how you structured the root file system and if it is divided into different partitions or volumes, those consequences will be more or less severe, but in any case undesirable.In any case it is always better to be safe than sorry, so use tools that perform automatic log rotation as logrotate and custom scripts to monitor and conduct periodic emptying actions to prevent file systems to get full. However, still using these prevention methods it is for sure it will be many times when you will have to act manually to troubleshoot problems.

October 1, 2014
cpu-cores

How to know how many cores and processors has a Linux box

The simplest and shortest method to measure the number of processors present on a Linux box, which is also widely extended as it’s part of coreutils is:Another way to get the same result which also allows us to obtain additional information from our processor are the lscpu command:Or we can examine the cpuinfo file from /proc filesystem:There are many additional details about these processors in /proc/cpuinfo file, including the CPU model and number of cores:

March 13, 2012

Comments

Be the first to comment

Submit comment