
| This forum is proudly powered by Scientific Linux 6 | SL website Download SL Help Search Members |
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| redman |
Posted: Jul 4 2011, 01:17 PM
|
|
![]() SLF Admin ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admins Posts: 1664 Member No.: 2 Joined: 8-April 11 |
When you are remotely updating a machine through SSH, there is always the possibility that the connection is broken.
And depending what you were doing, it can have serious consequences. Luckily there is a small tool to help you: screen. This application creates a new instance of bash which will continue to run even when the connection is broken. For example: login on a remote machine and switch to root. Give the command "screen". The new instance opens with the same useraccount, in this case root. Let the system do something that keep continuing, like "ping google.com" or "top". Now close the window. The connection is broken, but the command still runs. Now when you reconnect and switch to user root, the moment you give the command "screen -r -d" you will be presented with the running instance of screen. Ending it is simple, just give the command "exit". -------------------- What is SL? - Forum Rules - Info on 3rd Party Repos - How to post images - How to post large text / config files
Desktop: Asus P5QPL-AM, Intel Dual-Core E6500, 4GB DDR2, Asus GeForce GT 430 1GB, SL6.4 x86_64 Test box: Intel S5000PSL, 2x Intel Xeon E5310, 8GB ECC DDR2 FB-Dimm, Asus GeForce GT 220 1GB, SL6.4 x86_64 |
|
| scottro |
Posted: Jul 4 2011, 01:28 PM
|
|
|
SLF Member ![]() ![]() ![]() Group: Members Posts: 54 Member No.: 49 Joined: 14-April 11 |
There is also the newer tmux. I've found that I've come to prefer it. It's a BSD license instead of GPL, if that bothers anyone (but on the other hand, ssh is also a BSD license).
I have a little page on it at http://home.roadrunner.com/~computertaijutsu/screentmux.html that also goes a little more into screen, as well as giving a link to a good cheatsheet for those interested in trying tmux. |
|
| AndrewSerk |
Posted: Jul 4 2011, 04:08 PM
|
|
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 524 Member No.: 54 Joined: 14-April 11 |
Great tips guys.
Nice to see you here Scott Andrew |
|
| lemonzest |
Posted: Jul 4 2011, 09:50 PM
|
|
|
SLF Member ![]() ![]() ![]() Group: Members Posts: 144 Member No.: 109 Joined: 29-April 11 |
Gotta go with Scottro on this one, been using tmux for the past few years and its awesome
-------------------- Desktop: Phenom II X6 1090T Hex-Core (Socket AM3), 16GB RAM, MSI 870-C45, 5x 1TB HDD, Radeon HD 6770 1GB, Mageia 2 x86_64
Test Box:Intel Pentium E2180 (Socket 775), 4GB DDR3, ASRock G41-VS3 2.0, 4x 1TB, 2x 500GB, Onboard GFX, Mageia 2 x86_64 Connection: Virgin Media XL 60Mb/s Down, 3Mb/s Up |
|
| Jcink |
Posted: Jul 4 2011, 10:23 PM
|
|
|
SLF IRC Team ![]() ![]() ![]() ![]() Group: Members Posts: 204 Member No.: 15 Joined: 10-April 11 |
This is very useful advice no matter where you are, even if you're on the local network. I don't always use screen, but when I do, any critical commands that I don't want broken go right in there. Has saved me a few headaches.
|
|
| avamk |
Posted: Jul 4 2011, 10:29 PM
|
|||
|
SLF Member ![]() ![]() ![]() Group: Members Posts: 52 Member No.: 127 Joined: 6-May 11 |
Is there a repository that provides tmux? Or do I compile from source? Thanks for pointing this out. |
|||
| lemonzest |
Posted: Jul 4 2011, 11:14 PM
|
|||||
|
SLF Member ![]() ![]() ![]() Group: Members Posts: 144 Member No.: 109 Joined: 29-April 11 |
RPMforge (now repoforge) Has version 1.4.1 I belive -------------------- Desktop: Phenom II X6 1090T Hex-Core (Socket AM3), 16GB RAM, MSI 870-C45, 5x 1TB HDD, Radeon HD 6770 1GB, Mageia 2 x86_64
Test Box:Intel Pentium E2180 (Socket 775), 4GB DDR3, ASRock G41-VS3 2.0, 4x 1TB, 2x 500GB, Onboard GFX, Mageia 2 x86_64 Connection: Virgin Media XL 60Mb/s Down, 3Mb/s Up |
|||||
![]() |
![]() ![]() ![]() |