The screen command
Translation of the original in Catalan. Read it in: CatalàCastellano
Well the truth is that with the years I've been using linux, which aren't few by now, I had heard many times about tools like screen but for some reason I had never devoted time to looking into them properly. Well then, taking advantage of the fact that right now I'm in Andorra more alone than an owl, that there's nothing on TV and that I don't have any DIVX film to watch on the laptop I've read a NOVELL article I had downloaded about the screen subject and I really was surprised by the power and the number of interesting things it lets us do.
I had thought about rewriting the manual I've just read from English into Catalan but I think it's not worth it because the manual is very simple. So I recommend that you look at it: Turbocharge an SSH Connection with screen (local cache) besides it's very easy to read and full of screenshots. What I will do is argue why you should read it and what's good about screen.
One of the advantages I've liked most is the fact of being able to keep sessions with command-line applications without them being lost when we lose a remote session. That is, we can do the same as we do with the nohup command (man nohup) leave applications running when we exit the session but in addition these applications can be interactive and we can recover them whenever we want. Basically the difference is that nohup launches commands without associating them with a tty and screen works with pseudo-ttys (pts).
The other advantage I've liked a lot is the fact of being able to have multiple sub-consoles inside the remote console itself. That is, just by opening one SSH (a single socket) we can have more than one program running at the same time (even if interactive) and we can switch from one to the other without having to open more sessions. In the NOVELL document they use as an example 3 simultaneous commands: top, vi and ps. It also lets us jump from one session to the other or do things as spectacular as splitting the screen and watching the output of both applications at the same time.
The power of the command doesn't end here, you can copy and paste text between consoles and many other things so I recommend that you go through the program's wiki and dig deeper into the subject if you've liked it as much as I have.
4 comments
Comments from the old blog, as they were written. Comments are closed.
—
No em puc creure que un linuxero com tu no utilitze l'screen!
És el millor per deixar una sessió de BitchX i de tant en tant anar mirant "que se cuece" pel canal....
També l'utilitzo per a la musica... al server llanço un screen amb l'mpg123 i aixi per posar mussica faig un "screen -r, fletxa amunt, enter"... la ultima comanda sempre és un "mpg123 -Zz *" :)
—
Doncs com deia a l'article no és tan el no saber que hi havia eines així sinó no haver-m'ho mirat mai. Potser la culpa és que sempre ho resolia amb el nohup...
Mai és tard per aprendre coses...
javiVF
Res!!! tarjeta groga!!! ;)
Jo vaig descobrir el screen quan administrava un hlds ( -1 por gamer xD ) i molt de tant en tant l'he usat per actualizar sistemes via ssh. Fins a que no he lleguit el article no coneixia el nohup pero sembla que si que li fare us :D
—
Manual d'screen molt complet extret del wiki de gentoo:
TIP Using screen