{"id":1610,"date":"2021-12-16T13:23:37","date_gmt":"2021-12-16T10:23:37","guid":{"rendered":"https:\/\/files2.tojikon.net\/files-cloud\/2021\/04\/15\/ubuntu-how-to-use-screen-guide\/https:\/\/files2.tojikon.net\/files-cloud\/2021\/04\/15\/ubuntu-how-to-use-screen-guide\/"},"modified":"2021-12-16T13:23:37","modified_gmt":"2021-12-16T10:23:37","slug":"ubuntu-how-to-use-screen-guide","status":"publish","type":"post","link":"https:\/\/tojikon.net\/en\/1610-ubuntu-how-to-use-screen-guide\/","title":{"rendered":"Ubuntu: how to use Screen [Guide]"},"content":{"rendered":"<section id=\"related_posts\">\n<div class=\"block-head\">\n<h3>Related Articles<\/h3>\n<\/div>\n<\/section>\n<p>Screen is a handy tool as it allows users to save and come back to terminal sessions without having to keep the terminal window open. While many Linux users use this software on Linux servers, it can also be useful to Ubuntu users who want to always come back to a terminal program without having to keep the terminal open at all times.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-399986 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/ubuntu-how-to-use-screen-guide.png\" alt=\"Ubuntu: how to use Screen\" width=\"1200\" height=\"646\"\/><\/p>\n<p>In this guide, we\u2019ll show you how to install Screen on Ubuntu, how the program works, and how to use it too.\u00a0<\/p>\n<h2>Ubuntu: how to use Screen \u2013 Installation<\/h2>\n<p>Although Screen is one of the most used terminal session managers on Linux, it doesn\u2019t come pre-installed on Ubuntu. To use it, you will need to install it on your computer manually.\u00a0<\/p>\n<p>To start the installation of Screen on your Linux PC, open up a terminal window. To open up a terminal window on the Ubuntu desktop, press\u00a0<strong>Ctrl + Alt + T\u00a0<\/strong>on the keyboard. Alternatively, search for \u201cTerminal\u201d in the app menu and open up the program that way.<\/p>\n<p>Once the terminal window is open and ready to use on the Ubuntu desktop, use the\u00a0<strong>apt install\u00a0<\/strong>command below to install the Screen application.\u00a0<\/p>\n<pre>\nsudo apt install screen\n<\/pre>\n<p>Don\u2019t want to install Screen via the terminal? You\u2019ll also be able to find it in the Synaptic Package Manager. If you\u2019ve got Synaptic installed on Ubuntu, click \u201cSearch,\u201d type in \u201cscreen,\u201d and install the package.<\/p>\n<h2>Ubuntu: how to use Screen \u2013 Keybindings for Screen<\/h2>\n<p>Screen has a lot of keybindings you will need to understand if you want to use the program. Each of the keybindings will help you use Screen to manage your terminal sessions on Ubuntu.\u00a0<\/p>\n<p>There are a whole lot of keybindings for Screen. So many that if we posted them in this article, it\u2019d take up half the page, so we can\u2019t show them here. However, you can view the Screen keybindings yourself by doing the following.<\/p>\n<p>First, use the\u00a0<strong>man screen\u00a0<\/strong>command to view the manual for the Screen application. This manual is very long, but it details everything there is to know about the app.<\/p>\n<pre>\nman screen\n<\/pre>\n<p>Once inside of the Screen manual, press the\u00a0<strong>Spacebar\u00a0<\/strong>button till you get to the \u201cDEFAULT KEY BINDINGS\u201d section. From there, read the keybinding table to familiarize yourself with Screen.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-399983 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/ubuntu-how-to-use-screen-guide-1.png\" alt=\"\" width=\"1200\" height=\"600\"\/><\/p>\n<p>Want to view the keybinding info in your favorite text editor? Export it to a text file in your home folder with the command below.<\/p>\n<pre>\nman screen &gt; ~\/screen-manual.txt\n<\/pre>\n<p>Open up \u201cscreen-manual.txt\u201d to view it.<\/p>\n<h2>Ubuntu: how to use Screen \u2013 Basic use of Screen<\/h2>\n<p>Screen is a very advanced program, despite its small installation size. In this guide, we\u2019ll cover the fundamental elements of it, such as how to activate Screen, how to send terminal sessions to the background\/foreground, etc.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-399985 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/ubuntu-how-to-use-screen-guide-2.png\" alt=\"\" width=\"1200\" height=\"668\"\/><\/p>\n<p>To start, launch the Screen application in the terminal. To do that, execute the following\u00a0<strong>screen\u00a0<\/strong>command.<\/p>\n<pre>\nscreen\n<\/pre>\n<p>Once you launch the Screen app, you\u2019ll see a brief message talking about the program\u2019s copyright and capabilities. From here, press the\u00a0<strong>Space\u00a0<\/strong>button on the keyboard.<\/p>\n<p>After pressing\u00a0<strong>Space<\/strong>, you\u2019ll be presented with a blank terminal. However, this terminal is running through Screen. From here, you can launch any program. For example, to run the Top app in Screen, you\u2019d run:<\/p>\n<pre>\ntop\n<\/pre>\n<p>To send the Top app to the background and open up another terminal, press\u00a0<strong>Ctrl + A\u00a0<\/strong> followed by <strong>C<\/strong>. This keyboard combo creates a second terminal and keeps Top running, but in the background.<\/p>\n<p>To get back to the Top app, you can press\u00a0<strong>Ctrl + A,<\/strong> then the <strong>Ctrl + A<\/strong> a second time.<strong>\u00a0<\/strong>This button combination will swap you back to the Top running in the first terminal opened in Screen. You can press <strong>Ctrl + A\u00a0<\/strong>twice to go between the two running terminal sessions in Screen.<\/p>\n<p>If you have more than 2 Screen terminal sessions, pressing\u00a0<strong>Ctrl + A\u00a0<\/strong>twice won\u2019t navigate you through all of them. To navigate through multiple sessions, do the following.<\/p>\n<p>First, press\u00a0<strong>Ctrl + A,<\/strong> then\u00a0<strong>W\u00a0<\/strong>to list your Screen terminal sessions. Then, look at the list and note the numbers next to it. For example, if you have 3 Screen terminal sessions open, the list prompt (when pressing\u00a0<strong>Ctrl + A\u00a0<\/strong>then\u00a0<strong>W<\/strong>) will look like the code below.<\/p>\n<p><code>0*$ bash 1$ bash 2-$ bash<\/code><\/p>\n<p>Each Screen session has a number next to it. For example, to navigate to Screen session 0, you\u2019d do\u00a0<strong>Ctrl + A\u00a0<\/strong>then\u00a0<strong>0<\/strong>. To access\u00a0Screen session 2, you\u2019d press\u00a0<strong>Ctrl + A,<\/strong> then\u00a0<strong>2<\/strong>,\u00a0etc.<\/p>\n<h4><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-399986 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/ubuntu-how-to-use-screen-guide.png\" alt=\"\" width=\"1200\" height=\"646\"\/><\/h4>\n<h4>Kill a Screen terminal session<\/h4>\n<p>Need to kill an active Screen session? Here\u2019s how to do it. First, list out the sessions available by pressing <strong>Ctrl + A,<\/strong> then <strong>W<\/strong>. Then, access the session with \u00a0Ctrl + A, then the <strong>Ctrl + #<\/strong>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-399984 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/ubuntu-how-to-use-screen-guide-3.png\" alt=\"\" width=\"1200\" height=\"324\"\/><\/p>\n<p>Once inside of the session you wish to kill, press\u00a0<strong>Ctrl + A\u00a0<\/strong>then\u00a0<strong>K<\/strong>. Alternatively, kill all of your Screen session windows with\u00a0<strong>Ctrl + A\u00a0<\/strong>then\u00a0<strong>\\<\/strong>.<\/p>\n<h2>More information on Screen<\/h2>\n<p>In this guide, we covered the very basics of how to use Screen in Ubuntu. If you\u2019d like to learn more about the app and access some of its more advanced functions, you\u2019ll need to read the manual.\u00a0<\/p>\n<p>To read the Screen manual, open up a terminal window and enter the command below.<\/p>\n<pre>\nman screen\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Related Articles Screen is a handy tool as it allows users to save and come back to terminal sessions without having to keep the terminal window open. While many Linux users use this software on Linux servers, it can also be useful to Ubuntu users who want to always come back to a terminal program &hellip;<\/p>\n","protected":false},"author":1,"featured_media":1611,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21],"tags":[33],"_links":{"self":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1610"}],"collection":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/comments?post=1610"}],"version-history":[{"count":0,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1610\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media\/1611"}],"wp:attachment":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media?parent=1610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/categories?post=1610"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/tags?post=1610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}