Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

I was able to make GNU Screen start counting windows with the number 1 instead of the default 0 with this code in my .screenrc:

# Get rid of screen 0
bind c screen 1
bind ^c screen 1
bind 0 select 10

When I created windows in .screenrc I used screen 1 so that it would first try 1 and then count up if that window number was taken.

share|improve this question
up vote 51 down vote accepted

The solution is to modify ~/.tmux.conf to:

# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1

Edit: unlike base-index, pane-base-index is a window option, so setw should be used, as @Jogusa pointed out.

share|improve this answer
I wish they made this default, its really inconvenient as 0 as at the other side of the keyboard. – Sam Stoelinga Oct 30 '12 at 6:26
According to my tmux book it shoud be setw in the pane setting: setw -g pane-base-index 1 See the .tmux.conf from book: media.pragprog.com/titles/bhtmux/code/config/tmux.conf – Jogusa Sep 26 '14 at 11:43
What's the significance of setw vs set? – hekevintran Sep 26 '14 at 19:48
setw is alias for set-window-option or set -w. Altering pane-base-index is a window option. See tmux manpage -> manpages.ubuntu.com/manpages/precise/man1/tmux.1.html – Jogusa Sep 27 '14 at 10:21

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.