Linux Tactic

Streamline Your Command Line Workflow with Screen Utility

Introduction to Screen Utility

Do you ever find yourself working on the command line and needing to navigate between different screens or sessions? This can be a tedious task, constantly opening and closing sessions to access different tasks.

Luckily, GNU Screen utility can solve these issues, offering a versatile and convenient solution to command line navigation. In this article, we will discuss the installation process of the Screen utility and how to configure the .screenrc file to suit individual preferences.

We will examine the various features available within the Screen utility and explore how users can customize their experience to streamline their workflows.

Checking Screen Installation

Before implementing Screen, ensure that it is installed on your system. For Linux users, this can be done by entering the following command in the terminal:


sudo apt-get install screen


This command will check and install Screen if it is not already installed.

Saving Screen Session on Rebooting

One of the key benefits of Screen utility is the ability to save session information upon rebooting. This feature is especially useful when working on long-term projects and avoiding loss of work.

To implement this feature, users need to edit the .screenrc file. The .screenrc file is a configuration file that allows users to set their preferred settings for their Screen sessions.

Configuration for .screenrc File

Understand .screenrc File

The .screenrc file is responsible for configuring Screen utility to suit individual preferences. It allows users to customize their Screen experience by setting options such as the scrollback buffer size, welcome message, default windows, layouts, autosave and more.

The file is located in the user’s home directory and can either be edited using a text editor or via the Screen utility command line interface (CLI). Configuration for .screenrc File

Scrollback Buffer

Users can change the scrollback buffer size by setting the appropriate value in the .screenrc file. For example, adding the following line will increase the scrollback buffer size to 10000 lines:


defscrollback 10000


Welcome Message

Users can customize their welcome message by adding a custom message at the top of each Screen session. Adding the following line to the .screenrc file will set “Welcome to Screen!” as the welcome message:


startup_message “Welcome to Screen!”


Default Windows

Users can set the default windows that automatically open upon launching Screen. To set multiple windows, users need to separate each window by a comma.

For example, adding the below line would open windows for the top, middle and bottom of the terminal upon launch:


screen -t top middle bottom



Users can set the pre-defined layouts for Screen sessions. For example, adding the below line would set a blank layout for Screen sessions:


layout blank



The autosave feature will save a Screen session each time a window is closed. To turn on the autosave feature, add the following line to the .screenrc file:


deflog on



The Screen utility offers a convenient solution for command line navigation. By checking the Screen installation process and configuring the .screenrc file, users can customize their experience to suit their individual preferences.

The .screenrc file is an important aspect of the Screen utility, as it allows users to customize their session settings. By understanding and implementing the features within the .screenrc file, users can streamline their workflows and save time navigating through their command line tasks.

3) Third Party Applicationsto Third Party Applications

While Screen is a useful command line tool for navigating between applications and processes, there are several third-party applications that can enhance the Screen experience even further. These applications can add additional features to Screen, making it even more powerful and versatile.

Below are some third party applications that can be used with Screen:

1. Screenie – Screenie is a Screen wrapper that simplifies Screen commands for common tasks and adds GUI features.

It provides a simple interface for creating new sessions, attaching to existing sessions, and detaching from them. It also allows users to create tabs for each session and customize tab behavior.

2. Zombie – The zombie is a utility that monitors Screen sessions and kills any unresponsive sessions automatically.

It is an ideal tool for users running Screen sessions on a remote server. The zombie will keep the Screen sessions running, and if one of them becomes unresponsive, it will automatically kill it and close any associated processes.

3. Byobu – Byobu is a powerful Screen wrapper that adds additional functionality to Screen sessions.

It allows for easier management of multiple windows and tabs, while also offering access to several other command-line tools such as tmux and GNU Emacs.

Saving Screen Session with screen-session

The Screen utility offers users the ability to save their session and reload it later using the saved session name. The “save” command in Screen can be used for this purpose.

The following are the steps to save a Screen session:

1. Enter the Screen session you want to save.

2. Type the following command:


screen -S sessionname -X /var/run/screen/savedsessionname


Replace “sessionname” with the name of the Screen session you want to save and “savedsessionname” with the name you want to give to the saved session.

3. Detach from the Screen session by pressing “Ctrl+a” and then “d”.

4. To reload the saved Screen session, enter the following command:


screen -d -r sessionname


This will reload the saved session with the name specified.

It is important to note that Screen sessions can also be saved automatically using the autosave feature in the .screenrc file.


The Screen utility is a valuable tool for command-line users who need to manage multiple processes and windows simultaneously. By adding third-party applications to Screen, users can enhance their experience even further.

Saving Screen sessions is also an important feature, allowing users to return to their work even after a reboot or system crash. Overall, the Screen utility is a powerful tool that simplifies command line navigation and improves productivity.

In conclusion, the Screen utility is a powerful tool for command line navigation, allowing users to manage multiple processes and windows simultaneously. Third-party applications such as Screenie, Zombie, and Byobu can enhance the Screen experience even further.

Saving Screen sessions through the “save” command or autosave feature is important for returning to work after a reboot or system crash. Overall, the Screen utility is a valuable utility that can improve productivity for command-line users.

Its versatility and easy-to-use features make it an essential tool for managing background processes and navigating between applications.

Popular Posts