{"id":59111,"date":"2023-11-07T15:01:39","date_gmt":"2023-11-07T07:01:39","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=59111"},"modified":"2023-11-04T17:19:15","modified_gmt":"2023-11-04T09:19:15","slug":"linux-command-screen","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/","title":{"rendered":"How to Use the Screen Command in Linux"},"content":{"rendered":"<p>The <code>screen<\/code> command is a terminal multiplexer, which essentially means it allows you to run multiple terminal sessions within a single window. Ever needed to manage long-running tasks or keep your sessions alive even after you\u2019ve logged out? That\u2019s where screen comes into play.<\/p>\n<p>The beauty of <code>screen<\/code> is its ability to detach and reattach sessions, making it incredibly useful for remote work, long-running scripts, or any task that requires you to hop between multiple terminal windows. Commonly associated commands include <code>screen -r<\/code> to reattach a session, <code>screen -ls<\/code> to list active sessions, and <span class=\"key\">Ctrl<\/span> + <span class=\"key\">A<\/span>, then <span class=\"key\">D<\/span> to detach a session without terminating it.<\/p>\n<p>So, whether you\u2019re a system administrator juggling various tasks or a developer running multiple processes, screen is a command you\u2019ll want to add to your Linux toolkit. Read on to learn how to harness its full potential.<\/p>\n<p>General syntax for <code>screen<\/code> command:<\/p>\n<pre>screen [OPTIONS] [SESSION NAME]<\/pre>\n<hr>\n<h3>1. Create a session with specified name<\/h3>\n<pre>screen -S [file]<\/pre>\n<p>The <code>-S<\/code> option creates a new window within the screen and names it.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre>user@hostname:~$ screen -S my_session<\/pre>\n<p>After running this command, you\u2019ll be in the new screen session named <code>my_session<\/code>. You won\u2019t see the session name directly in the terminal, but you can list all active sessions by detaching from the current session (by pressing <span class=\"key\">Ctrl<\/span> + <span class=\"key\">A<\/span> followed by D<span class=\"key\">)<\/span> and then running <code>screen -ls<\/code>.<\/p>\n<p>Sample output for <code>screen -ls<\/code> after detaching:<\/p>\n<pre>user@hostname:~$ screen -ls\r\nThere is a screen on:\r\n        12345.my_session     (Detached)\r\n1 Socket in \/var\/run\/screen\/S-user.<\/pre>\n<p>In this example, <code>12345<\/code> is the process ID of the screen session, and <code>my_session<\/code> is the name you gave to the session.<\/p>\n<p>To reattach to this session, you can use:<\/p>\n<pre>screen -r 12345\r\n<\/pre>\n<p>Or if you named your session:<\/p>\n<pre>screen -r my_session\r\n<\/pre>\n<p>This will bring you back to the screen session you detached from.<\/p>\n<hr>\n<h3>2. List all screen processes<\/h3>\n<pre>screen -ls<\/pre>\n<p>This option displays all currently open windows, including those running in the background.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>The output will typically look something like this:<\/p>\n<pre>There are screens on:\r\n    12345.pts-0.hostname  (Detached)\r\n    67890.pts-1.hostname  (Attached)\r\n2 Sockets in \/var\/run\/screen\/S-username.\r\n<\/pre>\n<p>Here\u2019s a breakdown of the output:<\/p>\n<ul>\n<li><code>12345.pts-0.hostname<\/code> and <code>67890.pts-1.hostname<\/code> are the identifiers for the screen sessions.<\/li>\n<li><code>12345<\/code> and <code>67890<\/code> are the process IDs (PIDs) of the screen sessions.<\/li>\n<li><code>pts-0<\/code> and <code>pts-1<\/code> indicate the terminal types.<\/li>\n<li><code>hostname<\/code> is the name of the host machine where the screen sessions are running.<\/li>\n<li>(<code>Detached<\/code>) or (<code>Attached<\/code>) indicates the status of the screen session.<\/li>\n<li><code>Detached<\/code> means that the session is running in the background and not currently attached to any terminal.<\/li>\n<li><code>Attached<\/code> means that the session is currently being viewed in a terminal window.<\/li>\n<li><code>2 Sockets<\/code> in <code>\/var\/run\/screen\/S-username<\/code> indicates the number of screen sessions and the directory where the session sockets are stored. username is the name of the user who owns the sessions.<\/li>\n<\/ul>\n<hr>\n<h3>3. Reattach the Terminal\u2019s session<\/h3>\n<pre>screen -r [filename]<\/pre>\n<p>Use this option to reattach a screen session which was detached in past.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>Let\u2019s say you have a long-running process, like downloading a large file, and you want to keep it running even after you\u2019ve logged out. You can use screen to create a new session and run the process there.<\/p>\n<p>Create a new screen session:<\/p>\n<pre>screen -S my_download_session<\/pre>\n<p>This will create a new screen session named <code>my_download_session<\/code>.<\/p>\n<p>Run your long-running process:<\/p>\n<pre>wget http:\/\/example.com\/large-file.zip<\/pre>\n<p>Detach from the screen session:<\/p>\n<p>Press <span class=\"key\">Ctrl<\/span> + <span class=\"key\">A<\/span> followed by <span class=\"key\">D<\/span> to detach from the session. The session will continue running in the background.<\/p>\n<p>Log out or close the terminal:<\/p>\n<p>At this point, you can safely log out or close the terminal. The download will continue in the background.<\/p>\n<p>Reattach to the screen session:<\/p>\n<p>Later, when you want to check the progress or reattach to the session, you can use the <code>screen -r<\/code> command.<\/p>\n<pre>screen -r my_download_session<\/pre>\n<p>This will reattach you to the screen session named <code>my_download_session<\/code>, and you can see the progress of your download or any other long-running process.<\/p>\n<p>If you have multiple detached sessions and you\u2019re not sure what the session names are, you can list them with:<\/p>\n<pre>screen -ls\r\n<\/pre>\n<p>This will show you a list of all the detached and attached screen sessions, and you can pick the one you want to reattach to.<\/p>\n<hr>\n<h3>4. Detach a session<\/h3>\n<pre>screen -d [file]<\/pre>\n<p>The <code>-d<\/code> option is used to detach the screen session, allowing it to be reattached later.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>Here\u2019s a step-by-step example to demonstrate how <code>screen -d [filename]<\/code> can be used:<\/p>\n<p>Step 1: Create a New Screen Session with a Name<\/p>\n<p>First, create a new screen session and give it a name, for example \u201c<code>my_session<\/code>\u201c:<\/p>\n<pre>screen -S my_session<\/pre>\n<p>Step 2: Run Some Commands in the Screen Session<\/p>\n<p>After creating the session, you\u2019ll be inside it. You can run some commands like:<\/p>\n<pre>ls\r\necho \"Hello, World!\"<\/pre>\n<p>Step 3: Detach the Screen Session Manually<\/p>\n<p>You can detach from the screen session manually by pressing <span class=\"key\">Ctrl<\/span> + <span class=\"key\">A<\/span> followed by <span class=\"key\">D<\/span>. This will bring you back to your original terminal, but the session \u201c<code>my_session<\/code>\u201d will still be running in the background.<\/p>\n<p>Step 4: Reattach to the Screen Session<\/p>\n<p>You can reattach to the session using:<\/p>\n<pre>screen -r my_session<\/pre>\n<p>Step 5: Detach the Screen Session Using <code>-d<\/code><\/p>\n<p>Now, let\u2019s say you are in another terminal and you want to detach the session \u201c<code>my_session<\/code>\u201d without reattaching to it. You can use the <code>-d<\/code> option like this:<\/p>\n<pre>screen -d my_session<\/pre>\n<p>This will detach the session \u201c<code>my_session<\/code>\u201d if it\u2019s currently attached to any terminal, without terminating it. You can later reattach to it using <code>screen -r my_session.<\/code><\/p>\n<hr>\n<h3>5. Share a screen\u2019s session<\/h3>\n<pre>screen -X [sharing_session]<\/pre>\n<p>This option allows two people to log into the same account from different locations.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>Here\u2019s a simple example to demonstrate how you can use <code>screen -X<\/code> to send a command to a running screen session:<\/p>\n<p>Step 1: Create a New Screen Session<\/p>\n<p>First, open a terminal and create a new screen session named \u201c<code>my_session<\/code>\u201c:<\/p>\n<pre>screen -S my_session<\/pre>\n<p>Step 2: Detach from the Screen Session<\/p>\n<p>You can detach from the screen session by pressing <span class=\"key\">Ctrl<\/span> + <span class=\"key\">A<\/span> followed by <span class=\"key\">D<\/span>.<\/p>\n<p>Step 3: Send a Command to the Screen Session from Another Terminal<\/p>\n<p>Open another terminal window and use the <code>screen -X<\/code> command to send a command to the \u201c<code>my_session<\/code>\u201d screen. For example, let\u2019s send the quit command to terminate the session:<\/p>\n<pre>screen -S my_session -X quit<\/pre>\n<pre>This will terminate the \"my_session\" screen session.<\/pre>\n<h3 style=\"padding-bottom:10px\">More Linux commands:<\/h3>\n<table>\n<tbody>\n<tr>\n<td width=\"150\">Directory Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-rm-rmdir\/\"><code>rmdir<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cd\/\"><code>cd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-pwd\/\"><code>pwd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-exa\/\"><code>exa<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/\"><code>ls<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">File Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cat\/\"><code>cat<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/\"><code>cp<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-dd\/\"><code>dd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-less\/\"><code>less<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-touch\/\"><code>touch<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ln\/\"><code>ln<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-rename\/\"><code>rename<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-more\/\"><code>more<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-head\/\"><code>head<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">File System Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-chown\/\"><code>chown<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-mkfs\/\"><code>mkfs<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-locate\/\"><code>locate<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">Networking<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/\"><code>ping<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-curl\/\"><code>curl<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-wget\/\"><code>wget<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-iptables\/\"><code>iptables<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-mtr\/\"><code>mtr<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">Search and Text Processing<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-find\/\"><code>find<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-grep\/\"><code>grep<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-sed\/\"><code>sed<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-whatis\/\"><code>whatis<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ripgrep\/\"><code>ripgrep<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-fd\/\"><code>fd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-tldr\/\"><code>tldr<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">System Information and Management<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-env\/\"><code>env<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/\"><code>history<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-top\/\"><code>top<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-who\/\"><code>who<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-htop\/\"><code>htop<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-glances\/\"><code>glances<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-lsof\/\"><code>lsof<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">User and Session Management<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/\"><code>screen<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-su\/\"><code>su<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-sudo\/\"><code>sudo<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-open\/\"><code>open<\/code><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>","protected":false},"excerpt":{"rendered":"<p>The screen command is a terminal multiplexer, which essentially means it allows you to run multiple terminal sessions within a single window. Ever needed to manage long-running tasks or keep your sessions alive even after you\u2019ve logged out? That\u2019s where screen comes into play. The beauty of screen is its ability to detach and reattach&hellip;<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3397],"tags":[888,3316],"topic":[],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Use the Screen Command in Linux - Hongkiat<\/title>\n<meta name=\"description\" content=\"The screen command is a terminal multiplexer, which essentially means it allows you to run multiple terminal sessions within a single window. Ever needed\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use the Screen Command in Linux\" \/>\n<meta property=\"og:description\" content=\"The screen command is a terminal multiplexer, which essentially means it allows you to run multiple terminal sessions within a single window. Ever needed\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-07T07:01:39+00:00\" \/>\n<meta name=\"author\" content=\"Hongkiat.com\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hongkiat.com\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-screen\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-screen\\\/\"},\"author\":{\"name\":\"Hongkiat.com\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/7cc686597d92f9086729e4bcc1577ba3\"},\"headline\":\"How to Use the Screen Command in Linux\",\"datePublished\":\"2023-11-07T07:01:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-screen\\\/\"},\"wordCount\":921,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"keywords\":[\"Linux\",\"Linux Commands\"],\"articleSection\":[\"Desktop\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-screen\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-screen\\\/\",\"name\":\"How to Use the Screen Command in Linux - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"datePublished\":\"2023-11-07T07:01:39+00:00\",\"description\":\"The screen command is a terminal multiplexer, which essentially means it allows you to run multiple terminal sessions within a single window. Ever needed\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-screen\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-screen\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-screen\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use the Screen Command in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/7cc686597d92f9086729e4bcc1577ba3\",\"name\":\"Hongkiat.com\",\"description\":\"This post is published by an HKDC (hongkiat.com) staff. (I.e., intern, staff writer, or editor).\",\"sameAs\":[\"https:\\\/\\\/www.hongkiat.com\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Use the Screen Command in Linux - Hongkiat","description":"The screen command is a terminal multiplexer, which essentially means it allows you to run multiple terminal sessions within a single window. Ever needed","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/","og_locale":"en_US","og_type":"article","og_title":"How to Use the Screen Command in Linux","og_description":"The screen command is a terminal multiplexer, which essentially means it allows you to run multiple terminal sessions within a single window. Ever needed","og_url":"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2023-11-07T07:01:39+00:00","author":"Hongkiat.com","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Hongkiat.com","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/"},"author":{"name":"Hongkiat.com","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/7cc686597d92f9086729e4bcc1577ba3"},"headline":"How to Use the Screen Command in Linux","datePublished":"2023-11-07T07:01:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/"},"wordCount":921,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"keywords":["Linux","Linux Commands"],"articleSection":["Desktop"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/","url":"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/","name":"How to Use the Screen Command in Linux - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"datePublished":"2023-11-07T07:01:39+00:00","description":"The screen command is a terminal multiplexer, which essentially means it allows you to run multiple terminal sessions within a single window. Ever needed","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Use the Screen Command in Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/7cc686597d92f9086729e4bcc1577ba3","name":"Hongkiat.com","description":"This post is published by an HKDC (hongkiat.com) staff. (I.e., intern, staff writer, or editor).","sameAs":["https:\/\/www.hongkiat.com"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/com\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-fnp","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=59111"}],"version-history":[{"count":4,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59111\/revisions"}],"predecessor-version":[{"id":68917,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59111\/revisions\/68917"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=59111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=59111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=59111"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=59111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}