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 --versionInstallation
sudo apt-get update
sudo apt-get install screen
Start screen session
screen -S <session_name>List available screen sessions
screen -lsrDetaching screen session
Press ctrl + ad (Press control key and then a and d key [initials] in succession.)Re-attach screen session
- List available screens with screen -lsr
- screen -xr <put_session_name_here>
Terminate screen session
- List available screens with screen -lsr [To Reattach screen]
- screen -xr <put_session_name_here>[Reattach screen]
- Type exit and press enter.
Comments
Post a Comment