Tutorial to use Linux GNU screen in Linux based operating system.
Linux Screen or GNU Screen is a terminal multiplexer that lets you use several virtual terminal inside a session. It is useful when you need to deal with multiple programs from a command line. Programs continue to run when their window is currently not visible and even when the whole screen session is detached from the users terminal.
How To Use Linux GNU Screen
Install Linux GNU Screen
These days, the Linux Screen package is pre-installed on most of the Linux based operating systems. Run the following command to make sure that you have your copy of the Linux screen.
You will see output something like this:
Screen version 4.8.0 (GNU) 16-Aug-30
If you don’t have Linux screen installed in your operating system, then follow the instructions below:
Install Linux Screen on Ubuntu and Debian based operating systems
sudo apt update
sudo apt install screen
Install Linux Screen on CentOS/RHEL and Fedora
sudo yum install screen
How To Start Linux Screen
Start a Linux screen with the following command:
It is always better to give a name to the sessions when you are going to run multiple screen sessions.
screen -S session_name
Some of the regularly used Linux screens commands:
cCommand to create a new window (with shell)
"Command to list all window
0Switch to window 0 (by number )
AThe command to rename the current window
SCommand to split current region horizontally into two regions
|Split current region vertically into two regions
tabCommand to switch the input focus to the next region
Ctrl+aToggle between the current and previous region
QClose all regions but the current one
XCommand to close the current region
You can detach from the screen session at any time by running the following command:
Featured image: Opensource.com