How to freeze and unfreeze your linux bash shell terminal ?

Today we will look at an interesting tip to freeze and unfreeze our linux bash shell terminal.

Freeze: Ctrl+S
Unfreeze: Ctrl+Q


How it works ?
Freeze will freeze our terminal and we are not able to do anything on the terminal.
However all commands are stored in buffer and will run as soon as we unfreeze our terminal.

For example:- Below i freezed my terminal by pressing Ctrl+S and then pressed enter key multiple times, ran few commands.

All were executed as soon as freeze is over.

[root@4a2df8b3084c system]# 
[root@4a2df8b3084c system]# 
[root@4a2df8b3084c system]# 
[root@4a2df8b3084c system]# 
[root@4a2df8b3084c system]# pwd
/lib/systemd/system
[root@4a2df8b3084c system]# date
Thu Feb 21 21:43:34 UTC 2019
[root@4a2df8b3084c system]# 
[root@4a2df8b3084c system]# 
[root@4a2df8b3084c system]# 
[root@4a2df8b3084c system]# date
Thu Feb 21 21:43:34 UTC 2019
[root@4a2df8b3084c system]# 

Commands fired when shell is freezed, however executed after freeze is over, not when the shell is freezed.

See the date command output which was ran on a gap of 4 seconds, however showing same time.

One Reply to “How to freeze and unfreeze your linux bash shell terminal ?”

Leave a Reply

Your email address will not be published.