Screen Utility – A Unix terminal multiplexer
Screen… A utility which gave me flexibility to use my putty as a multiplex of Unix terminals. And now is far easy for me to traverse through various shell consoles with ease. I personally found Screen very useful for me as a System Admin, you got to have many servers to watch at single point of time and keeping an eye on all of them may lead you to confusion between multiple putty sessions.
But screen made this very easy, as every screen is marked with a name/number, easy to recognize and traverse. I am going to discuss here various Screen command for reference –
Screen start/stop commands -
screen -S <screen name> [creates new screen]
screen -r <screen name> [attach to a screen]
screen -d <screen name> [detach from a screen]
Ctrl+a Ctrl\ [terminates the screen and all tabs init]
exit [terminates a tab in a screen]
screen -list [lists all the screen in system at that point of time]
Traversing in a Screen -
Ctrl+a n [next tab in a screen]
Ctrl+a p [previous tab in a screen]
Ctrl+a <number> [switch to the tab number]
Ctrl+a Ctrl+a [switch between tabs]
Ctrl+a c [new tab in a screen]
Ctrl+a A [rename the screen tab]
Ctrl+a : [Screen command prompt]
Ctrl+s [Pause screen output]
Ctrl+q [Resume screen output]
Ctrl+a ‘ [prompt for name or number of the tab to switch for]
Handling Parent Screen – Screen can be in layer layout. In that case outer screen will be handled with keyword Ctrl+e rest traversal commands are same.
Access control in Screen –
Let us take a case where a teacher in a class created a session and now want to share the screen with all the students, piece of cake with screen. Just create a screen and give rights to the respective students and they can see what is going on. We can make changes to the access right to this screen as well.
Ctrl+a :
at prompt write – "multiuser on"
Now screen is running in multiuser mode. This can be verified by "screen -list" command.
Some commands to control users in a Multiuser mode screen –
Ctrl+a : > acladd <user name> [adds user to screen user list]
Ctrl+a : > aclchg +-r+-w+-x <user name> [change user permissions]
Ctrl+a : > acldel <user name> [removes user from screen user list]
Ctrl+a : > wall <message> [displays a message on all tabs to all screen users]
Drawback –
You actually can not see your scroll backs after a limit. but still that can be managed in copy mode with command " Ctrl [ ". But still this is not that easy and comfortable.
Hope this article was helpful.
For detailed Screen Utility reference –

