Tired of switching back and forth between local and remote terminal sessions by logging in and out? Then screen is (one of) the tool (s) for you!
screen will be available on most Linux systems, including the PSU clusters. It is also available as a package in Cygwin. Once you have it installed, try the following sequence of steps:
1. Open a terminal window and type screen. A welcome message will be displayed. Your terminal window is now running the screen program, even though you may not notice a difference.
2. Press (Ctrl+a c) — that is, hold down Ctrl, then press a and c. This will create a new “screen”. Note that all screen commands start with Ctrl+a by default.
3. You now have two “screens” running. To see this, press (Ctrl+a w) to display the list of open windows. In Cygwin, this will display in the top bar of your terminal. There will be an asterisk next to the window you’re currently in.
4. Press (Ctrl+a n) to toggle through your “screens”. Try ssh-ing into a remote system in one of the screens, then switching back to the other screen on your local system. This is a great way to avoid logging in and out every time you need to move between systems!
5. You can close a single screen by pressing (Ctrl+a K) (note the capital K). You can quit the whole screen program by running screen -X quit.
There are many other things you can do with this. I just discovered it not long ago, although I suspect the more Linux-minded people among us have known about it for a while. There is a more comprehensive list of commands available here: http://kb.iu.edu/data/acuy.html
Thanks for reading, and feel free to add to this post if you learn/know some good tips.