If you use putty for connecting remote session, think of the situation when the session was disconnected when you are in middle of operation (for example, executing a code). It will be nice if the operation still continues. Linux screen helps to achieve this.
Moreover, it allows technical people to collaborate for various purpose including debugging an issue.
Technical explanation
Linux Screen allows you to:
Use multiple shell windows from a single SSH session.
Keep a shell active even through network disruptions.
Disconnect and re-connect to a shell sessions from multiple locations.
Run a long running process without maintaining an active shell session
Allow to connect from multiple machines. This enables multiple people to collaborate (e.g. debugging)
Refer https://hackernoon.com/a-gentle-introduction-to-tmux-8d784c404340
https://superuser.com/questions/236158/tmux-vs-screen
show window number
caption always # activates window caption
caption string '%{= wk}[ %{k}%H %{k}][%= %{= wk}%?%-Lw%?%{r}(%{r}%n*%f%t%?(%u)%?%{r})%{k}%?%+Lw%?%?%= %{k}][%{b} %Y-%m-%d %{k}%c %{k}]'
Screen commands
screen -r -> attach screen
screen -S <myscreen> -t <terminal name>
screen -x <myscreen>
Key shortcuts
Key Action Notes
Ctrl+a c new window
Ctrl+a n next window
Ctrl+a p previous window
Ctrl+a " select window from list I have window list in the status line
Ctrl+a Ctrl+a previous window viewed
“Ctrl-a” “d” Detach current screen
“Ctrl-a” “[” To scroll up the screen
To rename the window title within a screen session use: press and release Ctrl + a and then press Shift + a.
Useful link: https://unix.stackexchange.com/questions/27780/how-to-rename-a-gnu-screen-session
Occasionally, we may need to use sub-screen. For example, while debugging session, you want to login to a box and then use existing screen in that machine.
ctrl+a a will pass the escape sequence to the sub-screen.. Then after you can use commands to do various operation. For example ctrl+a, a, c will create a window in the sub-screen.
ctrl+a a will pass the escape sequence (ctrl+a) to the sub-screen.. So, ctrl+a a d will do ctrl+a d in the sub-screen (detaching it).
select stalled window ( C-a :select <stalled window number> )
send kill command ( C-a :kill )
Ref: https://superuser.com/questions/458122/gnu-screen-kill-a-frozen-tab
http://www.pixelbeat.org/lkdb/screen.html
https://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/
https://www.mattcutts.com/blog/a-quick-tutorial-on-screen/
http://unix.stackexchange.com/questions/29140/how-do-you-detach-the-2nd-screen-from-within-another-screen