If you’ve never SSHed into a UNIX or Linux system, you can safely ignore this post…
This week I was remotely installing Gentoo Linux on my system at the University. Gentoo is notorius for taking forever to install. The first emerge -auDN world can take several hours. I didn’t want to have to worry about my SSH connection dying (the Internet connection to our apartment isn’t very reliable) and I wanted to be able to check its status from work and home. I had heard of screen and I thought it might be able to handle something like this.
Here’s how it works. I SSHed into the machine and started screen. It just gives you another shell, running inside the screen process. I then started the emerge and made sure it got started okay. Then I detached from screen by typing Control-a d. After that, any time I wanted to check on the progress of the emerge I could SSH into the machine and run screen -r, which reattached to the screen instance I had started earlier. Very cool. screen has a lot of other capabilities, but I haven’t taken the time to check them out.