How to make tmux count windows starting from 1 instead of 0?

I had the ability to make GNU Screen start counting home windows with the number 1 as opposed to 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 developed home windows in.screenrc I made use of screen 1 to make sure that it would certainly first attempt 1 and afterwards count up if that window number was taken.

113
2022-06-06 20:02:26
Source Share
Answers: 1

The remedy is to change ~/.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 alternative, so setw needs to be made use of, as @Jogusa mentioned.

179
2022-06-06 20:16:05
Source