How you freeze and "thaw out" a screen on a Linux system depends a lot on what you mean by these terms. Sometimes \u201cfreezing a screen\u201d might mean freezing a terminal window so that activity within that window comes to a halt. Sometimes it means locking your screen so that no one can walk up to your system when you're fetching another cup of coffee and type commands on your behalf.\nIn this post, we'll examine how you can use and control these actions.\n\nHow to freeze a terminal window on Linux\nYou can freeze a terminal window on a Linux system by typing Ctrl+S (hold control key and press "s"). Think of the "s" as meaning "start the freeze". If you continue typing commands after doing this, you won't see the commands you type or the output you would expect to see. In fact, the commands will pile up in a queue and will be run only when you reverse the freeze by typing Ctrl+Q. Think of this as "quit the freeze".\nOne easy way to view how this works is to use the date command and then type Ctrl+S. Then type the date command again and wait a few minutes before typing Ctrl+Q. You'll see something like this:\n$ date\nMon 16 Sep 2019 06:47:34 PM EDT\n$ date\nMon 16 Sep 2019 06:49:49 PM EDT\n\nThe gap between the two times shown will indicate that the second date command wasn't run until you unfroze your window.\nTerminal windows can be frozen and unfrozen whether you're sitting at the computer screen or running remotely using a tool such as PuTTY.\nAnd here's a little trick that can come in handy. If you see that a terminal window appears to be inactive, one possibility is that you or someone else inadvertently typed Ctrl+S. In any case, entering Ctrl+Q just in case this resolves the problem is not a bad idea.\nHow to lock your screen\nTo lock your screen before you leave your desk, either\u00a0Ctrl+Alt+L or\u00a0Super+L (i.e., holding down the Windows key and pressing L) should work. Once your screen is locked, you will have to enter your password to log back in.\nAutomatic screen locking on Linux systems\nWhile best practice suggests that you lock your screen whenever you are about to leave your desk, Linux systems usually automatically lock after a period of no activity. The timing for "blanking" a screen (making it go dark) and actually locking the screen (requiring a login to use it again) depend on settings that you can set to your personal preferences.\nTo change how long it takes for your screen to go dark when using GNOME screensaver, open your settings window and select Power and then Blank screen. You can choose times between 1 and 15 minutes or never. To select how long after the blanking the screen locks, go to settings, select Privacy and then Blank screen.\u00a0Settings should include 1, 2, 3, 5 and 30 minutes or one hour.\nHow to lock your screen from the command line\nIf you are using Gnome screensaver, you can also lock the screen from the command line using this command:\ngnome-screensaver-command -l\nThat's a lowercase L for "lock".\nHow to check your lockscreen state\nYou can also use the gnome screensaver command to check whether your screen is locked,. With the --query option, the command tells you whether screen is currently locked (i.e., active). With the --time option, it tells you how long the lock has been in effect. Here's an sample sctipt:\n#!\/bin\/bash\n\ngnome-screensaver-command --query\ngnome-screensaver-command --time\n\nRunning the script will show output like this:\n$ .\/check_lockscreen\nThe screensaver is active\nThe screensaver has been active for 1013 seconds.\n\nWrap-up\nFreezing your terminal window is easy if you remember the proper control sequences. For screen locking, how well it works depends on the controls you put in place for yourself or whether you're comfortable working with the defaults.