SHARE
Facebook X Pinterest WhatsApp

The Many Uses of Screen

Written By
thumbnail Juliet Kemp
Juliet Kemp
Sep 1, 2020
ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More



Last week I talked about using cut
and paste within Screen
. You can also use screen for several other useful tricks as well.

Tip of the Trade: There’s much to love about Screen. Besides enabling cutting and pasting, the utility can be used to monitor a window for output, mirror another session, lock the screen and more.

  • Monitor a window for output: Hit Ctrl-A Shift-M when in window 1, and then flip to window 2 (with Ctrl-A N), and you’ll be notified in window 2 when there’s output in window 1. This is useful if you’re running a job that takes a long time; no need to keep flipping between windows. You can also monitor for silence with Ctrl-A _. This is useful if you’re running a compile job or something else that outputs a lot of stuff when it’s running successfully.
  • Use the window list: Hit Ctrl-A ” to see the window list. This is great if you have lots of windows open within screen. To name your windows more helpfully, use Ctrl-A Shift-A while in the window to set its title.
  • Mirror another session: Use screen -x to connect to another existing session, and mirror everything that goes on in it. The existing session will also mirror anything that goes on in the second on. I use this when connecting to the server that runs my email from more than one place at once. It can also be useful for debugging — log in as the user that’s having problems, and connect to his or her screen session.
  • Lock the screen: Hit Ctrl-A X to lock the screen; unlock it using your password.

You can also use the ~/.screenrc file to set persistent options, including to start a set of windows up when screen launches. Check out the manpage and the GNU screen wiki for more.

Juliet Kemp has been messing around with Linux systems, for financial reward and otherwise, for about a decade. She is also the author of “Linux System Administration Recipes: A Problem-Solution Approach” (Apress, 2009).

Follow ServerWatch on Twitter

thumbnail Juliet Kemp

Juliet Kemp is a ServerWatch contributor.

Recommended for you...

What Is a Container? Understanding Containerization
What Is a Print Server? | How It Works and What It Does
Nisar Ahmad
Dec 8, 2023
6 Best Linux Virtualization Software for 2024
What Is a Network Policy Server (NPS)? | Essential Guide
ServerWatch Logo

ServerWatch is a top resource on servers. Explore the latest news, reviews and guides for server administrators now.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.