Manage Learn to apply best practices and optimize your operations.

Use “screen” to have multiple “windows” in a single PuTTy Session

A useful and neat utility not included in ESX server is “screen”. You can connect to SSH multiple times using PuTTy.

A useful and neat utility not included in ESX server is “screen”. You can connect to SSH multiple times using PuTTy, but each is a separate session. So if you have 5 simultaneous tasks to do, you would have to open 5 SSH sessions and login to each. Each SSH session must be left open while a process is taking place. Therefore, you cannot connect, start a long process, and then disconnect (as you would be able to when using Microsoft RDP and Citrix). The screen allows you to have many “windows” in a single PuTTy session and allows you to close your SSH Session while leaving processes running.

To install the screen you have to download these packages from Redhat Linux website. I found clicking at these links did not work, so instead I had to crank-up an FTP client and connection anonymously to access the FTP site

ftp://ftp.redhat.com/pub/redhat/linux/7.2/en/os/i386/RedHat/RPMS/screen-3.9.9-3.i386.rpm

ftp://ftp.redhat.com/pub/redhat/linux/7.2/en/os/i386/RedHat/RPMS/utempter-0.5.2-6.i386.rpm

Installation Procedure

   Download the packages above
   WinSCP them to your ESX server
   Install utempter-0.5.2-6.i386.rpm first with :rpm -Uvh –nodeps utempter-0.5.2-6.i386.rpm

   and then screen with

   rpm -Uvh –nodeps screen-3.9.9-3.i386.rpm

   Note:
   Screen is now installed, its not a service so it shouldn’t be a burden on the service console.

Creating “Windows” and Toggling Between Them
Note:
It is best to show you this by illustration

   Logon to the Service Console using PuTTy
   Type the command:screen
   You will get a welcome screen, press [Enter] to clear this screen

   Note:
   This is your first window. Typing screen -ls lists will cause the windows to open and socket names will be allocated to each.
   Start esxtop
   Type control+a followed by c to create a new console window within the screen you have created. Note:
   You can do this multiple times for multiple processes
   In the new “window” Start topNote:
   We now have two screens, one running esxtop and the other top.


   To switch to the next screen (like Alt+Tab in Windows) type: control+a followed by nNote:
   You can use control+a followed by p for the previous screen

 Now close your PuTTy session and re-open a brand new session with PuTTy
   Type screen -ls to list your screens sockets.
   To reconnect to your screen: screen -r 2014.pts-0.esx1

Note:
 So what we have seen here is how to create multiple screens. To switch between screens disconnect and reconnect to running screens. It’s not a tool I use that much myself – but I imagine others might find it useful. Where I have used it is when I need to be in two different locations on the file system. Rather than having two PuTTy session open, I just create another screen

 
   To exit the screens you are in just type exit as you would in PuTTy
   If you want a list of command type control+a followed by ?Note:
   If you want to read another guide on screen – see:

   http://www.rackaid.com/resources/tips/linux-screen.cfm

This was last published in November 2005

Dig Deeper on VMware ESX and ESXi administrative tips

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchServerVirtualization

SearchVirtualDesktop

SearchDataCenter

SearchCloudComputing

Close