Configuring and Using screen Advanced Settings

45 minutes
  • 5 Learning Objectives

About this Hands-on Lab

The `screen` command has a lot of depth. It’s a great productivity enhancement utility for the busy systems operator, developer, DevOps engineer, and — really — anyone who has ever had to access a remote system via SSH and efficiently get more than a single task done! Even in its default mode, though, there is a lot you can do to tune up its functionality, make using multiple sessions and windows easier, easily create and use regions, and use layouts to make using multiple different sets of regions much more pleasant! In this lab, you’ll learn how to set up your own customized `.screenrc` file from scratch, change important defaults to make life better, configure multiple startup windows, arrange them with regions, and then make it easy to get into a particular productive workspace with layouts.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Use SSH/SCP to Copy Files from Other Systems

Use the SSH utility scp to initially copy a file from another system via a completely detached screen session.

Use the `stuff` Command to Automate SSH

Automate the copy of a file via scp for the future using the -X option to send the required keystrokes to the utility so it can be fully hands off.

Configure Windows to Start Automatically

Set up a number of windows/commands to be running when screen is invoked, including assigning specific titles and window numbers.

Set Up Basic and Advanced Layouts

Define and implement regions that will contain windows/commands in a basic one-window layout, as well as a more complex four-window layout designed to make it easy to monitor system health data while still allowing the execution of commands as necessary.

Switch Easily between Layouts

Define key combinations that will make it easy to switch instantly between layouts of regions and windows, moving from a four-window system health monitoring layout to a full-screen Bash shell one-window layout for the execution of commands and full output.

Additional Resources

You are a mid-level system admin/systems operator who needs to use some of the more advanced operations of the screen command to automate the retrieval of a file from a remote system, and then come up with a way to see four different commands and their output on a single display.

You'll use the automation features of the -X option to screen to accomplish the SSH/SCP copy of the remote file and the regions and layouts feature along with the .screenrc configuration file to set up your advanced windowing layout.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?