How to multitask in a Linux terminal? Today we will show how you can use screen software programs to multitask in a Linux terminal. The screen is a full-screen software program that can be used to multiplex a physical console between different processes. It allows a user to open several separate Terminal instances inside a single Terminal window manager.
The screen application is very useful if you are working with multiple programs from the command line interface and for separating programs from the terminal shell. It allows you to share your session with other users and disconnect/connect terminal sessions.
Multitask in a Linux terminal
Install Screen On Debian-based Systems
sudo apt-get install screen
On RedHat-based Systems
sudo yum install screen
Start Screen
Run screen command in terminal
screen
This will open a fresh screen instance.
“Ctrl-a” and “?” Except for type quotes. Then you will see all the commands or parameters on the screen.

You can press Space or Return to exit the help menu.
Start screen with the session name
screen -s session name
Detach from Screen Session
Press Ctrl+a d
List Current Screen Sessions
<pre> screen -ls </pre>

Note: Connected sessions mean that they are currently open in any terminal session, and disconnected sessions mean that they are not open in any terminal session.
Attach an existing screen session
screen -r sessionname
Attach an already attached screen session
screen -x sessioname
Move to the next Screen Session
Press Ctrl+a n
Go to the previous screen session
Press Ctrl+a p
Create a new screen session from within any screen session
Press Ctrl+a c
Now you can start using the screen utility and create multiple screen windows from a single session, navigate between windows, disconnect and resume screen sessions. Buy Linux VPS from Oudel Inc.



