{"id":85798,"date":"2022-09-07T12:22:30","date_gmt":"2022-09-07T12:22:30","guid":{"rendered":"https:\/\/ded9.com\/?p=85798"},"modified":"2025-12-20T10:50:27","modified_gmt":"2025-12-20T10:50:27","slug":"what-is-linux-screen-how-to-install-it","status":"publish","type":"post","link":"https:\/\/ded9.com\/de\/what-is-linux-screen-how-to-install-it\/","title":{"rendered":"What Is Linux Screen and How to Install It"},"content":{"rendered":"<p>Sysadmins usually manage virtual servers using the Linux terminal. However, you can get more out of Terminal by implementing Linux Screen into your workflow. Linux Screen is a favorite among professional developers, so don&#8217;t underestimate it if you want to become a professional Sysadmin.<\/p>\n<p>Although it may seem a bit difficult initially, Linux Screen is easy to learn and offers unlimited possibilities. It is a very useful management tool; after using it, you don&#8217;t need to look for an alternative.<\/p>\n<p>With this in mind, we will teach you how to enable and use Linux Screen to increase the flexibility of the Linux terminal.<\/p>\n<h2>What is a Linux screen?<\/h2>\n<p>Linux Screen is a terminal program developed by the <a href=\"https:\/\/www.gnu.org\/gnu\/linux-and-gnu.en.html\" target=\"_blank\" rel=\"noopener\">GNU<\/a>. Many official sources call it GNU Screen, which is used for terminal multiplexing.<\/p>\n<p>In other words, the Screen divides a physical terminal into several virtual sessions, stops it, and summarizes the activity.<\/p>\n<p>This is how it works: if you&#8217;re working in a terminal session while using Screen, it&#8217;s saved at that point when you&#8217;re done, and you shut down the computer. When you reaccess the Terminal, the Terminal will return to the Screen you were working on before the shutdown.<\/p>\n<h2>How to install Linux screen?<\/h2>\n<p>Don&#8217;t worry whether Linux Screen will be installed on your Linux distribution. Because it has been tested on most distributions and works well<\/p>\n<p>First, we need to connect to our server using the <a href=\"https:\/\/ded9.com\/what-is-the-ssh-protocol\/\">SSH<\/a> command. Open your Terminal and type the following command:<\/p>\n<p>Note: Enter your server&#8217;s IP instead of a username and the server.<\/p>\n<p><em>ssh username@server<\/em><\/p>\n<p>If your Linux distribution is Debian, Ubuntu, or Linux Mint, enter the following command:<\/p>\n<p><code>Sudo apt install screen<\/code><\/p>\n<p>But if your Linux distribution is CentOS, enter the following command:<\/p>\n<p><code>Sudo yum install Screen<\/code><\/p>\n<p>Or, if the user can&#8217;t run Sudo commands, we need to run it as a root user:<\/p>\n<p><code>Yum install Screen<\/code><\/p>\n<p>At the end of the installation, we can check the current version of Linux Screen using the following command line:<\/p>\n<p><code>screen-version<\/code><\/p>\n<p>The process of installing the Linux screen is finished with ease. You can use it from now on.<\/p>\n<h3>Using Linux Screen in all Linux distributions<\/h3>\n<p>To run Linux Screen, type the following in your Terminal:<\/p>\n<p><code>screen<\/code><\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-85799 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2022\/09\/screen-welcome-768x503-1.png\" alt=\"To run Linux Screen, type the following in your Terminal:\" width=\"768\" height=\"503\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2022\/09\/screen-welcome-768x503-1.png 768w, https:\/\/ded9.com\/wp-content\/uploads\/2022\/09\/screen-welcome-768x503-1-300x196.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/p>\n<p>After pressing the space key, you will see the Terminal again. Do not worry. Just type exit and press Enter.<\/p>\n<p>Now we can start a session and name it using the -S variable. For example:<\/p>\n<p><em>screen -S session1<\/em><\/p>\n<p>It is better to give it an understandable name so you can easily access it next time and not forget it.<\/p>\n<p>Linux Screen uses specific commands to multiplex the Terminal, which are easy to learn. They all follow a Ctrl+ *** structure where * are the same variables.<\/p>\n<p>The Linux Screen is case sensitive. So be careful when entering commands.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-85802 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2022\/09\/screen-welcome-1-1-768x503-1.png\" alt=\"The Linux Screen is case sensitive. So be careful when entering commands.\" width=\"768\" height=\"503\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2022\/09\/screen-welcome-1-1-768x503-1.png 768w, https:\/\/ded9.com\/wp-content\/uploads\/2022\/09\/screen-welcome-1-1-768x503-1-300x196.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/p>\n<h2>Working with Linux screen in a new session<\/h2>\n<p>Now that we have created a new session, we must learn how to work with it. Some of the main commands we deal with:<\/p>\n<ul>\n<li>Create a new window: Ctrl + C<\/li>\n<li>List of all created windows: &#8220;Ctrl+a.&#8221;<\/li>\n<li>Delete a Ctrl+a, which is helpful in case of a mistake: Ctrl+a a<\/li>\n<li>Leave running session: Ctrl+a Ctrl+d<\/li>\n<\/ul>\n<p>It is also possible to split the terminal Screen. For example, using Ctrl+a S splits the Terminal horizontally:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-85805 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2022\/09\/screen-split-768x503-1.png\" alt=\"It is also possible to split the terminal Screen. For example, using Ctrl+a S splits the Terminal horizontally:\" width=\"768\" height=\"503\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2022\/09\/screen-split-768x503-1.png 768w, https:\/\/ded9.com\/wp-content\/uploads\/2022\/09\/screen-split-768x503-1-300x196.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/p>\n<p>To switch to the next Terminal, press CTRL+a TAB. Press CTRL+a X to close it.<\/p>\n<h2>How to manage multiple sessions using the Linux screen<\/h2>\n<p>One of the great features of Screen is that it can leave ongoing actions in the background. So that when we return to them, they are still running. This feature is excellent for server administrators.<\/p>\n<p>I will use htop for this example. With the following command, we can install it on Debian, Ubuntu, Linux Mint, etc.:<\/p>\n<p><code>sudo apt install htop<\/code><\/p>\n<p>You can then run htop by typing the following command in your Terminal:<\/p>\n<p><code>htop<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-85808 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2022\/09\/screen-htop-300x196-1.png\" alt=\"You can then run htop by typing the following command in your Terminal:\" width=\"300\" height=\"196\" \/><\/p>\n<p>Next, we&#8217;ll use CTRL+a and CTRL+d to detach the run from the Terminal. You can work on something else from here while the previous window runs in the background. If you want to open the same htop Terminal, first type the following command:<\/p>\n<p><code>screen -ls<\/code><\/p>\n<p>It shows all your saved sessions. To reopen htop, enter the following command:<\/p>\n<p><code>screen -r process_number<\/code><\/p>\n<p>Here, for example, our process_number is 11520<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-85811 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2022\/09\/screen-process-number-768x503-1.png\" alt=\"Here, for example, our process_number is 11520\" width=\"768\" height=\"503\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2022\/09\/screen-process-number-768x503-1.png 768w, https:\/\/ded9.com\/wp-content\/uploads\/2022\/09\/screen-process-number-768x503-1-300x196.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>Learning to install and use Linux Screen is very important, especially if you work as a server administrator. It is a very useful tool that can greatly improve your overall performance. Here, you learned how to install Screen on your server and how to use its basic commands.<\/p>\n<h2>FAQ<\/h2>\n<div id=\"rank-math-rich-snippet-wrapper\"><div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-1\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What is Linux Screen?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Linux Screen is a terminal multiplexer that lets you run and manage multiple terminal sessions within one window and keep them running after disconnecting.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-2\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">How do I install Screen on Linux?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Use your distro\u2019s package manager (e.g., sudo apt install screen or sudo yum install screen) to install the Screen utility.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-3\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">How do I start a Screen session?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Type screen in the terminal to start a new session, and use keyboard shortcuts like Ctrl-a d to detach and screen -r to reattach.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Sysadmins usually manage virtual servers using the Linux terminal. However, you can get more out of Terminal by implementing Linux Screen into your workflow. Linux Screen is a favorite among professional developers, so don&#8217;t underestimate it if you want to become a professional Sysadmin. Although it may seem a bit difficult initially, Linux Screen is [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":85815,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[69],"tags":[32,33],"class_list":["post-85798","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux","tag-os"],"acf":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/85798","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/comments?post=85798"}],"version-history":[{"count":5,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/85798\/revisions"}],"predecessor-version":[{"id":266334,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/85798\/revisions\/266334"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/media\/85815"}],"wp:attachment":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/media?parent=85798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/categories?post=85798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/tags?post=85798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}