Using the screen command under Linux is an effective way of having several "windows" to work in. One screen may be the bash shell, another mysql command line open against a database and yet another a vim session for editing source code files.
Under Windows one can use alt-tab to fast change focus to another window. Under Linux I may have to:
- Type Ctrl-a + "d" (to detach the current screen)
- Type "screen -ls" to see pid's for active screens (assuming that I don't remember the pid of the other screen)
- Type "screen -r [pid]" (to resume the selected screen)
Now, normally using command line can be fast once the proper commands and shortcuts have been acquired. However, changing between screens does not seem elegant and fast compared to just pressing Alt-tab in Windows. In fact, it seems extensive, clumsy and tedious having to type out commands and pid's.
(Point 3 above can be improved a bit by typing "scr" + Ctrl-r to go back through command history, assuming that I have accessed the other screen earlier, but it is still not really elegant)
So, I wonder if there is a way to fast change between the screens with a single or few key strokes -- preferably one that does not require to be set up again every time one starts a new terminal session against the server.
Update: As Mr Lister points out, the terminal application in Linux desktops (and even putty in Windows) in and of themselves provide an option to open several consoles and switch between them with short cuts, e.g. Ctrl+PgUp/Dn in Ubuntu. However, in this case I am using the basic bash terminal in a headless server in the cloud, so the accepted solution is a perfect one in the sense that the functionality described resides in bash in the server itself and does not depend on opening additional connections to the server.