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.
Successfully complete this lab by achieving the following learning objectives:
- Use SSH/SCP to Copy Files from Other Systems
Use the SSH utility
scpto initially copy a file from another system via a completely detached
- Use the `stuff` Command to Automate SSH
Automate the copy of a file via
scpfor the future using the
-Xoption 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
screenis 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.