Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I learned to use gnu-screen and have been using it for the past several weeks. I got a grip of the basics now, and would be very helpful if I get these queries clarified:

  1. How do I rename / reorder / move windows in Linux screen utility?

    For eg., after a few days of use, I come to a state where the window-numbers are 2, 3, 6, 8. Now I want a new-window to be created at #9, or #7. Is this possible? If yes, how?

    Also, is it possible to 'move' the window #6 to #4 or #7? If yes, how?

  2. Scrolling shortcut: Scroll takes Ctrl-A + Esc, and then Ctrl-u / Ctrl-d. Is there a way to map PgUp / PgDn to do these directly? Or, is there a way to map some key (like F5) to take me to copy mode, and then PgUp / PgDn for scrolling?

  3. I have enabled "caption always", so the current window title is displayed always at the bottom. Is there a way to display the current window's log-file-name and logging status (on/off) in the same caption bar?

share|improve this question
:number X moves window to specific position – Ency Mar 7 '11 at 18:08
Check this out hardstatus string "%{.kG}%-Lw%{.KW}%n%f %t%{-}%+Lw %=%{..G} %H %{..W} %d/%m %C%a " it provides a lot of information (Z$L..) for all windows at time – Ency Mar 7 '11 at 20:52
Rangzy these are really multiple questions – Zac Thompson Mar 8 '11 at 4:40
So, should I be posting these as separate question-threads here ? (I am new to participating here, so any guidance will help me to learn fast). Thanks! – Rangzy Mar 8 '11 at 8:07
Ency : thanks for the hardstatus string tip. It shows lot of details, but not the logfile name and status info. Any idea on this ? – Rangzy Mar 8 '11 at 8:50

You can renumber the current window with ctrl+a :number x where x is a numeric argument.

You can rename the current window with ctrl+a A

share|improve this answer
Renumbering even works if the new number is already in use. In this case the windows exchange their numbers. Nice. – Uwe Geuder Dec 17 '12 at 14:16
I was a little confused at first. You have to type the literal string "number" and x is the kind of parameter to the number renaming function. – rrenaud Sep 6 '14 at 21:10
More symetrically and easier to remember you can do: ctrl+a :title new window title – Wadih M. Feb 14 at 1:27
@WadihM. just so long as there's no spaces in the new_window_title – scf Mar 31 at 21:08

You may want to look at the source for Byobu. Byobu is a very nice configuration package for Screen which takes a lot of advantage of the bottom bar:

Bostonvaulter's suggestion of tmux is good too if that's available to you. If you have to log on to a lot of systems you don't necessarily have a lot of control over, it's good to know Screen since it's more widely available.

share|improve this answer

I would highly suggest you try tmux instead. It has many more features than screen and is much better at managing windows. For example you can do a vertical split whereas with screen you can only do a horizontal split.

share|improve this answer
That's not true, in screen do ctrl+A ctrl+| for a vertical split – Nick Garvey Aug 14 '12 at 0:51
@NickGarvey the vertical split patch for screen is not in GNU Screen. It is a patch that is applied by some distros. – Jason Axelson Aug 14 '12 at 1:18
Interesting, thanks for the correction. – Nick Garvey Aug 14 '12 at 1:46

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.