spk-logo-tm-2023
0%
1-888-310-4540 (main) / 1-888-707-6150 (support) info@spkaa.com
Select Page

Unix 101: Utilize the “Screen” Command

windchill features best plm software
Written by SPK Blog Post
Published on April 8, 2014

In my previous post, I highlighted 5 great commands to improve administering your Unix machines within your infrastructure. The very first command I mentioned was screen, which allows you to run multiple pseudo-terminal “windows” within one shell session.

Screen also allows you to maintain whatever you’re doing in the shell even if you lose your connection because it detaches the screen sessions when you lose connectivity to the server — allowing you to reconnect and resume right where you left off. I often will start long-running commands in my screen session, and then reconnect and check on it at a later time by re-attaching to my session. There are plenty of uses for this powerful command.

So what does screen look like? Well, not a whole lot. But first, you probably should install it on your system if it’s not already there. It’s not included by default in many distributions, but some, like RedHat, include it as part of the core package. In any case, use your package manager to install it (as root, or using sudo):

RedHat/CentOS/Fedora variants:

yum install screen

Debian/Ubuntu variants:

apt-get install screen

This will install screen and any required dependencies. So now that you have it, you can start it by just typing screen from the command prompt. Or if you want to give a name to your screen session, type screen <name>. That makes it easy to reattach to that session by a simple name rather than the default which is an arcane name made up of your PID, terminal session and server name. Keep it easy I say.

Once screen starts, it clears the screen, and depending on your version, will show a small splash screen, or just clear the screen and display a prompt. If you’re using Putty for Windows, you’ll see the title bar has a title like:

[screen 0: bash]

As you open more windows within screen, this will change based on which window you’re currently in.

At this point, you’re free to do what you’d normally do within a command shell. You can open a new window by typing screen again, or use the keyboard shortcut, Control-A C.

Want more keyboard shortcuts? I created this cheat sheet that has a list of command commands and keyboard shortcuts to use with screen. Download it here and try it out!

Have any comments or questions about screen, or success stories with using it? Feel free to leave a comment below! I’d love to hear it.

Next Steps:

Bradley Tinder, Systems Integrator, SPK & Associates

Latest White Papers

Strategies for Cloud and AI Transformation

Strategies for Cloud and AI Transformation

As businesses modernize, cloud solutions and AI seem to be the default. Dive into this eBook to explore why this is, as well as some modernization strategies.What You Will Learn In this eBook, you will learn how: AI is driving modernization Cloud is delivering results...

Related Resources

Beyond the Buzz: What 2026 Demands of Tech & Engineering Leaders

Beyond the Buzz: What 2026 Demands of Tech & Engineering Leaders

In the tech space and beyond, modern buzz has all pointed to AI. While I love exploring new ideas, I am also quite a pragmatist. This past year, I’ve navigated through endless white papers, blogs, books, videos, social posts, and articles about AI. These detail how it...

Jira Product Discovery vs. Airtable: What To Know In 2026

Jira Product Discovery vs. Airtable: What To Know In 2026

As product organizations head into 2026, the pressure to build the right things faster and with clearer alignment to business outcomes has never been higher.  Product leaders are expected to balance customer feedback, strategic priorities, delivery constraints, and...

7 Must-Have ALM Capabilities for Modern Engineering

7 Must-Have ALM Capabilities for Modern Engineering

Modern engineering moves too fast for scattered tools and tribal knowledge. A strong Application Lifecycle Management (ALM) platform becomes your team’s operating system, connecting strategy to execution, requirements to releases, and every artifact along the way. The...