---
title: 'Basics of working with the screen utility | Zomro'
description: 'The article discusses the basic commands and the principle of working with the screen utility for launching programs for long-term execution on the server.'
image: 'https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a44@server-panel.net/2022/12/01/1671362177_1671362125548.png'
---

![opened image]()

  * [Zomro](https://zomro.com/)
  * [FAQ](https://zomro.com/blog/faq/)
  * Basics of working with the screen utility 



# Basics of working with the screen utility

09-12-2022

The screen utility can be useful on a server running a Linux operating system. From the man page: Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells). This utility can be used, for example, if you need to start a process manually and then disconnect from the server. Or it is necessary to save the session if there is a possibility of losing the session, or the possibility that some abnormal disconnection from the server will occur, for example, when the Internet connection fails.  
  
To work with the screen utility, you will need to connect to the server via ssh. (Our blog has a separate article about this)

ZOMRO / contact form

Need help from a system administrator? 

Describe the issue and we will get back to you within 15 minutes.

Your name 

Your email 

Phone 

Describe the problem 

LEAVE A REQUEST →  [ ![](/static/site/imagesNew/svg/telegram-btn-icon.svg?v=1793704481) Message us on Telegram ](https://t.me/zomro_sysadmin)

You can find the full list of services and prices on the page [ Server administration and maintenance services. ](/paid-support-services/server-management-services)

## **How to install the screen utility**

  
To install the screen utility run in deb-like distributions:
    
    
    apt-get install screen

  
In rpm-like ones:
    
    
    yum installscreen

  
To run the utility, enter the following at the command line:
    
    
    screen

  
You can also start a session with a name, for example:
    
    
    screen -S archiving

  
After entering these commands, a screen session is created, which looks like a regular terminal. You can work in it like in a regular terminal, enter commands, including launching long processes, which, presumably, can be interrupted in work.  
  
The screen session can be disconnected and you can disconnect from the server, continue to perform other tasks, or start another screen. To detach from screen, type **Ctrl+a, d** on the keyboard (first press **Ctrl+a** together, then **d**). You will return to the previous mode of your ssh session, from which you can disconnect.  
  
Multiple screen sessions can be opened. If you do not specify a name when creating a session, it will be assigned a numeric identifier and a default name. To view a list of screen sessions, run the command:
    
    
    screen -ls

![Basics of working with the screen utility - 1](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a44@server-panel.net/2022/12/01/1671362177_1671362125548.png)

  
In the output, you can see a list of sessions: their identification number and name. If no name has been given, it is added automatically (for example, pts-0.myserver).  
  
To rejoin an existing session (if there was one), run the command:
    
    
    screen -r

  
If there are multiple sessions, a list of existing ones will be displayed. To join a specific session, you must specify its name. For example,
    
    
    screen -r archiving

  
or
    
    
    screen -r 30887

  
To exit the screen session and close it, type **exit** or press **Ctrl+d**.  
  
Not all possibilities of this utility are considered. There are many other command line options, as well as commands that can be used inside a screen session (such as creating windows, switching between them, and many others). In order to learn all the features of the program, refer to its reference manual:
    
    
    man screen

  
You can get help on the combinations that can be used inside screen by first pressing **Ctrl+a** followed by the "**?** " character.

![Basics of working with the screen utility - 2](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a44@server-panel.net/2022/12/01/1671361766_1671361737355.png)

### Conclusion

The main features of the screen utility, the creation of sessions from which you can disconnect or run long processes without fear of disconnecting from the server, were considered.

We also suggest you other useful articles:

  * [How to create a Telegram bot for monitoring remote hosts](https://zomro.com/blog/faq/316-kak-sozdat-telegram-bota-dlja-monitoringa-udalennyh-hostov)
  * [htop - Linux interactive system monitor](https://zomro.com/blog/faq/314-htop-interaktivnyj-sistemnyj-monitor-linux)
  * [Connecting to the VPS server via SSH using a key](https://zomro.com/blog/faq/235-podkljuchenie-k-serveru-cherez-ssh-po-kljuchu-s-nestandartnym-portom)



Similar articles:

[Password reset on Windows Server 2016 - 2012](https://zomro.com/blog/faq/149-sbros-parolja-na-windows-server-2012-2016) [How to run 24/7 YouTube live stream on linux](https://zomro.com/blog/faq/213-kak-zapustit-kruglosutochnuju-transljaciju-youtube-na-linux) [How to install Nginx in Docker-Compose](https://zomro.com/blog/faq/317-kak-ustanovit-nginx-v-docker-compose) [How to create and delete an additional domain in cPanel?](https://zomro.com/blog/faq/190-kak-sozdat-i-udalit-dopolnitelnyj-domen-v-cpanel) [Introduction to CI/CD: Analysis of Development Methodology](https://zomro.com/blog/faq/437-znakomstvo-s-cicd-analiz-metodologii-razrabotki)

[ Virtual hosting from €3.98/mon ](/virtual)

![](/static/site/imagesNew/blogSupport/popup-server.avif?v=1793704481)

ZOMRO / SERVER MANAGEMENT

Need a sysadmin's help? 

Describe the issue and we will get back to you within 15 minutes.

Your name 

Your email 

Phone 

Describe the problem 

LEAVE A REQUEST →  [ ![](/static/site/imagesNew/svg/telegram-btn-icon.svg?v=1793704481) Message us on Telegram ](https://t.me/zomro_sysadmin)

You can find the full list of services and prices on the page [ Server administration and maintenance services. ](/paid-support-services/server-management-services)

Your data has been successfully sent!

Thank you for contacting us. We will get back to you shortly.

Got it! 
