Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Currently, when I enter ^a : (control-A followed by ':') to send a command to GNU screen, I can go back one step in the history, and see exactly ONE previous command. This is really annoying, as I'm used to being able to go back thousands of steps in my shell history, and I'd like to be able to save at least a few dozen screen commands as well.

How can I do this?

share|improve this question
up vote 3 down vote accepted

This is actually a function of screen and, in its current release, is NOT possible--only one line of the history is stored. There was a patch posted to the mailing list some time ago, but it may not be applicable today.

Unfortunately, development on screen has slowed significantly, so if you're looking for more modern features, you may want to look at something like tmux--which is newer, but a bit more unstable than screen.

share|improve this answer
Thanks, I've looked at tmux, but I've got such an extensive .screenrc that I'm not looking forward to trying to port it over to tmux. Also, it doesn't yet have the killer feature: the ability to save sessions that survive a reboot. ;) – iconoclast Dec 2 '10 at 18:47
(Paragraph 2:) does tmux have a real command history, for commands sent to tmux (as opposed to the shell)? – iconoclast Dec 2 '10 at 18:48
tmux doesn't use commands in the same vein as screen. I was merely presenting an alternative that is undergoing active development, as that is more likely to see changes. :) – Andrew M. Dec 3 '10 at 2:43
I tested it in tmux, and it DOES allow scrolling through command history. – iconoclast Dec 29 '10 at 17:46

Take a look at this thread from last year: GNU screen loses (parts of) command histories

share|improve this answer
No, that refers to shell history or scroll-back buffers. The OP is asking about commands typed at screen's colon prompt. – Dennis Williamson Dec 1 '10 at 0:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.