<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rahul Agarwal on Medium]]></title>
        <description><![CDATA[Stories by Rahul Agarwal on Medium]]></description>
        <link>https://medium.com/@rahulkagr?source=rss-e1cc684ebc8b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*tqxe1DDDbvhciTJZTW2HJQ.jpeg</url>
            <title>Stories by Rahul Agarwal on Medium</title>
            <link>https://medium.com/@rahulkagr?source=rss-e1cc684ebc8b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 10:43:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rahulkagr/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Understanding Screen: A Lifesaver for Remote Tasks]]></title>
            <link>https://rahulkagr.medium.com/understanding-screen-a-lifesaver-for-remote-tasks-652a3693e738?source=rss-e1cc684ebc8b------2</link>
            <guid isPermaLink="false">https://medium.com/p/652a3693e738</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Rahul Agarwal]]></dc:creator>
            <pubDate>Fri, 22 Dec 2023 15:57:23 GMT</pubDate>
            <atom:updated>2023-12-22T15:57:23.057Z</atom:updated>
            <content:encoded><![CDATA[<p>We’ve all been there — in the midst of a critical task on a remote server, only for the connection to drop, leaving our work hanging in the balance. Enter <em>screen</em> — the ultimate solution to such connection hiccups.</p><p><strong>Exploring Screen</strong></p><p>Screen, or GNU Screen, is a terminal multiplexer, essentially allowing you to create a screen session and spawn multiple windows (virtual terminals) within it. The beauty? Processes initiated within Screen persist even if your connection is disrupted, safeguarding your progress.</p><p>Consider scenarios like unexpected power outages, VPN disruptions, or any abrupt disconnection; Screen acts as a shield, preserving your ongoing processes, barring machine deployments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pS1KXMr5oZLZArnMny-tiQ.jpeg" /></figure><h3><strong>Getting Started</strong></h3><h4><strong><em>Installing Screen Command</em></strong></h4><ol><li><em>OS Identification and installation</em></li></ol><p>Identifying the operating system holds significance due to the distinct package managers they offer. For instance, Ubuntu utilizes apt-get as its package manager, while the Alpine Linux variant employs apk add. Understanding the specific package manager associated with an OS is crucial for seamless software installation and system maintenance.</p><p>For example, In the Alpine Linux variant, it can be installed using the command:</p><pre>apk add screen</pre><p>In Ubuntu, it can be installed by:</p><pre>sudo apt install screen</pre><p>2. <em>Package Verification</em></p><p>To verify if Screen has been successfully installed or not, we can use this command.</p><pre>screen -v</pre><p>If the command shows the version of Screen, it means the package has been installed correctly.</p><p>The output might resemble:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*adCETH1H88CFxXaMZlKmFQ.png" /></figure><h4>Basic Commands</h4><ol><li><em>Initiating Named Session</em></li></ol><p>To start a named session of the screen, we can use this command.</p><pre>screen -S session_name</pre><p>The assigned name helps in the identification of screen sessions when we have multiple active screen sessions.</p><blockquote>Note: A session can have multiple windows, to create a window in a session , we can use ctrl-a + c and to list all the windows we can use ctrl-a + “</blockquote><p>2. <em>Detaching from a Screen Session</em></p><p>A session can be detached from the screen using the command:</p><pre>Ctrl+a d</pre><blockquote>Note: The program in the session will continue to run even after the detachment of screen from the session.</blockquote><p>3.<em> Reattaching to a Screen</em></p><p>To continue where you left off in your screen, just use this command:</p><pre>screen -r session_name</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*JhIncqIZUjEiEqiOzxYaeg.png" /></figure><p>4. <em>Listing the sessions</em></p><pre>screen -ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ruTkB-L7oQSlMMBO4HcOyA.png" /></figure><h4>Useful Shortcuts</h4><ul><li><strong>Ctrl+a c</strong> - Create a new window (with shell).</li><li><strong>Ctrl+a &quot;</strong> - List all windows.</li><li><strong>Ctrl+a 0</strong> - Switch to window 0 (by number).</li><li><strong>Ctrl+a A</strong> - Rename the current window.</li><li><strong>Ctrl+a S</strong> - Split the current region horizontally into two.</li><li><strong>Ctrl+a |</strong> - Split the current region vertically into two.</li><li><strong>Ctrl+a tab</strong> - Switch input focus to the next region.</li><li><strong>Ctrl+a Ctrl+a</strong> - Toggle between the current and previous windows.</li><li><strong>Ctrl+a Q</strong> - Close all regions except the current one.</li></ul><blockquote>An important consideration in a Dockerized environment is that if a deployment is initiated, the pods will be taken offline, causing the running command to halt abruptly.</blockquote><p>Embrace <em>screen</em> to safeguard against unexpected interruptions during remote tasks, ensuring uninterrupted productivity.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=652a3693e738" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>