Super User is a question and answer site for computer enthusiasts and power users. 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

This question already has an answer here:

I use GNU Screen tool to keep my sessions alive on the system. To switch between windows I use Ctrl+a N where N is the number of the window. I want to use similar keystroke to access windows with numbers in two digits. As of now I have to go to window list by Ctrl+a " and then select the window.

Is there a way to achieve what I'm trying to?

share|improve this question

migrated from Oct 4 '11 at 18:10

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Journeyman Geek Jan 30 at 12:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 11 down vote accepted

If you type Ctrl+a+' (an apostrophe), screen asks you to enter the window number. It's in screen help on the left side. Hit Ctrl+a+? to see the help.

share|improve this answer
That should be the accepted answer. – scai Jun 19 '14 at 11:23
This should be written as <kbd>Ctrl</kbd><kbd>a</kbd>,<kbd>'</kbd> and <kbd>Ctrl</kbd><kbd>a</kbd>,<kbd>?</kbd> respectively or something similar to indicate not all three keys are pressed at the same time. Since that markup seems disabled in comments: That's Ctrl+a,' or Ctrl+a,? respectively. – valid May 31 at 8:26

Well I don't know what your doing that actually needs 10+ processes to be accessible in one screen instance anyway, but you might just use ctrl-a n/p to go back and forth (which conveniently wraps around).

And consider just using 2 instances of screen ... or even a screen-in-screen

There is no way to switch directly to windows above number 9 as explained in the doc.

share|improve this answer
Having 9+ processes in Screen is not the case always but sometimes I do have 12-13 processes running and I need to watch them at the same time. Looks like I'll have to stick with Ctrl+a ". – RonakG Oct 4 '11 at 15:03
you can have a split screen too. Which works nice if you want to have more processes open at the same time. Maybe Byobu could be useful too – jpjacobs Oct 4 '11 at 15:16
the initial comment is completely unnecessary. having more than 10 windows in screen for me is commonplace, I do different things in different directories in each and it's much more productive to have one window per task (watch logs, edit sources, run stuff, monitor results, etc). – msb Oct 22 '14 at 22:42
I sometimes open a separate window to each server of the same cluster, so it's rather common for me to have more than 10 windows. thanks. – Ruslan Sep 7 '15 at 22:42

According to screen's manual page, you can add the following lines to your ~/.screenrc file:

bind -c demo1 0 select 10
bind -c demo1 1 select 11
bind -c demo1 2 select 12
bindkey "^B" command -c demo1

makes C-b 0 select window 10, C-b 1 window 11, etc. Alternatively, you can use:

bind -c demo2 0 select 10
bind -c demo2 1 select 11
bind -c demo2 2 select 12
bind - command -c demo2

makes C-a - 0 select window 10, C-a - 1 window 11, etc.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged .