screen command in ubuntu

Sometimes you find yourself in a situation where your Network connection is not consistent or you have to execute a time consuming task but do not have all the time to be available in front of your desk, like your shift is going to be over. In situation of these kinds you can use the screen command. With screen, you can reconnect to that server and pick up where you left off with your last command. Screen is a full-screen window manager that multiplexes a physical terminal between several processes. When you call the screen command, it creates a single window where you can work as normal. You can open as many screens as you need, switch between them, detach them, list them, and reconnect to them.

Introduction

Screen is a console application that allows you to use multiple terminal sessions within one window. The program operates within a shell session and acts as a container and manager for other terminal sessions, similar to how a window manager manages windows.

Check version

screen --version

Installation

sudo apt-get update
sudo apt-get install screen

Start screen session

screen -S <session_name>

List available screen sessions

screen -lsr

Detaching screen session

Press ctrl + ad (Press control key and then a and d key [initials] in succession.)

Re-attach screen session

  1. List available screens with screen -lsr
  2. screen -xr <put_session_name_here>

Terminate screen session

  1. List available screens with screen -lsr  [To Reattach screen]
  2. screen -xr <put_session_name_here>[Reattach screen]
  3. Type exit and press enter.

Reference

Comments

Back To Top

Popular posts from this blog

How to save video from Internet Explorer

error 18 at 0 depth lookup: self signed certificate

How to check fragmentation in MySQL tables