Screen is a great program that allows you to run different things in different “screens” from the console. We will go through the basic Screen commands and how to install screen in a Linux VPS Server. Think of Screen like your browser. You opened different tabs in the browser to browse different websites and switch between the different tabs.
Screen also has the added advantage that when you run commands in a screen session. For example, an install process. So, If you get cut off or your session times out. Screen will carry on running your install. On most Linux installs screen is installed by default. To check screen is installed call the version variable.
Check Screen version
To check your screen version;
screen --version
Install Screen Linux
CentOS / Fedora
yum install screen
Ubuntu / Debian
apt install screen
Open a new Screen
You can open a new screen by issuing the screen command
screen
If like us you work on multiple things at the same time by having many different screens open it can get complicated. So, it’s best to create named screens.
Named Sessions
So, to create a named session issue the -S argument
screen -S YOUR_SCREEN_NAME
Open new Screen
By naming your screen you know exactly what it’s doing. When you have five or ten or fifty screens open it’s much easier to see which screen is which. To create a named screen you press cntrl+a+c.
cntrl+a+c
Screen Commands
The possible command for screen are listed below;
Cntrl+a+a
List all windows
Cntrl+a+c
Create a new window
Cntrl+a+0
Switch to window 1 (by number )
Cntrl+a+S
Split current region
Cntrl+a+tab
Switch the input to the next region
Cntrl+a+A
Rename the current window
Cntrl+a+Ctrl+a
Toggle between the current and previous region
Cntrl+a+Q
Close all regions but the current one
Cntrl+a+X
Close the current region
Terminate Screen Session
You can close the screen session by using the cntrl+a+d
cntrl+a+d
That’s the basics of Screen and how to install Screen. Ensure your server is secured with a Firewall.
How was this article?
More from Dedicated Servers
What are zombie processes and how to manage them
Zombie processes are processes the server has completed but not terminated. You might see "<defunct>" when looking at the processes …
How to set up a squid proxy with multiple IPs
How to set up a squid proxy with multiple IPs This guide is available in template form for Virtuozzo VPS servers. …
How to set up a SOCKS5 Proxy Server Using Dante – Ubuntu
Set up a SOCKS5 Proxy Server Proxy servers have been around for years. A proxy server is a way of connecting …