How to multitask in Linux with Screen

How to multitask in Linux with Screen

Screen allows you to have multiple shell sessions, switch between them, as well as terminate the SSH session on a remote machine while keeping long-running tasks running, and return to the session later.

Start new screen session

screen
screen -S session_name

Detach from screen

^a + d

List screens

screen -ls

Re-attach screen

screen -r session_name

Quit screen

screen -X -S session_name quit