This is so much fun I’ve added it to my Raspberry Pi install script
http://www.tecmint.com/screen-command-examples-to-manage-linux-terminals/
Self Explanatory in the article except I used:
sudo apt-get install screen
(As user Pi)
Pete.
This is so much fun I’ve added it to my Raspberry Pi install script
http://www.tecmint.com/screen-command-examples-to-manage-linux-terminals/
Self Explanatory in the article except I used:
sudo apt-get install screen
(As user Pi)
Pete.
Comments are closed.
Hi Pete,
Just saw this and thought I’d just mention tmux… it’s basically the same as screen, but in my (personal) opinion it’s a little easier to use.
There’s a few sites which list the pro / con between the two – but to me, tmux just seems easier to create & resize panes as & when I need them.
Just passing on the knowledge… 🙂
After 20 years of screen – I switched to tmux a couple of years ago and havent looked back. I’ll still use screen on servers that dont (yet) have tmux… and both are awesome tools.
Yup, I too have been using screen for ages (over 25 years). I discovered it back at the end of the 80s, when I was at college. It was the time of 2400-baud modems (faster was available, but not affordable for me) and call-waiting, so it was a *necessity*!
It’s also useful to know how to use the scroll-back buffer:
CTRL-a ESC => Start copy/scrollback mode
CTRL-b / CTRL-f => Move back / forward one screenful at a time
Actually, you can use most ‘vi’ screen movement keys to navigate the buffer. There are also commands to mark selections, copy, and paste them. But I’ll refer you to the man pages for that.
And my most-used shortcut is probably CTRL-A CTRL-A, which just switches you between the current screen, and the last one you viewed. When you have four or more screens open, and need to switch back and forth between two of them that are not sequential, that’s generally the best way.
Right – no prize competition for pointer to the best SCREEN cheat sheet. I had a pal over to have a look and I simply could not remember the instructions – I need something on the wall for a while.
@Dougal Campbell: Another useful command while in scrollback mode, is the search command. As you mention, it’s vi-alike so using “/…” and “?…” in combination with “n” (to search for the next occurance) will do the trick…
I don’t know if Oliver Laumann ever frequents your blog Pete, but if he does I’d like to say a big thank you
for close to 30 years (yup, tempus doesn’t half bleedin’ fugit) of screen. I first started using it on Lear Siegler ADM-3A terminals and it has been one of the first things I install on all my machines ever since. The splash screen back in those days used to credit Oliver and the Technical University of Berlin whenever you started the program.
There are so many options that the manual page has become virtually impenetrable for new users, but “CTL-a c” (create), “CTL-a n” (next), “CTL-a p” (previous) and “CTL-a k” (kill) are all easy to remember and the only essentials.
“CTL-a w” (windows) lists all of your current windows and “CTL-a t” (time) will display the current time. If you want to work on two files at the same time, “CTL-a |” (that’s the pipe charachter, BTW) will split your screen down the centre to give you a LHS and RHS window (handy for comparing files — and you use “CTL-a TAB” to change focus between the two halves).
The option that has always been such a boon though, is being able to log back into a remote machine at some later time (or date!) and resume a screen session, to find all of your processes still running. Absolutely magic!
If you happen to use a laptop and have ever closed the lid, only to remember that you were running a two-day compile on a remote host, screen is for you. 🙂
Thanks Oliver!!
Have fun, Pete!
And thank YOU for that info – I tried the time and split screen and they worked a treat though I’m not sure what the right half is supposed to be doing – care to explain that bit?
So I split the screen – went to the right side – nothing… hit Split screen and now I have THREE.. Very nice but how to use the other two – and how to close them?
I found all the cheat sheets. By the time I was finished I had terminals all over the screen. This is great.
Use “CTL-a TAB” to get over to the RHS window and then “CTL-a c” to create a new terminal (shell) in that window. A second “CTL-a TAB” flips you back to the LHS.
If you kill all of the running shells on the RHS with “CTL-a k”, the split screen mode will disappear once the last shell is gone.
“screen -r” to re-attach a running “screen” on a remote system is the bees-knees, though. 🙂
I couldn’t agree more with the above “testimonial” of @PuceBaboon.
Screen is indeed one of the most useful apps on a Linux system. I’m using it for 10+ years now, this to my great satisfaction. Has lots of whistles and bells but with a few basic commands you’re getting a long way already. And still, a lot of “wintered” Linux users aren’t aware of this tool. Strange…
Of course, all my RPi’s are “equipped” with this tool. Since I’m using all my RPi’s as “headless servers” the screen tool is then simply indispensible. In combination with Putty (on Windows) or directly through SSH (on Linux), this makes it an ideal workhorse!