Join my Bash scripting course on Udemy 👀

Start numbering tmux windows from index one

October 13, 2020  ‐ 1 min read

With tmux the windows you create start counting from 0. I know this is kind of the default for programming related things. However in this case it doesn't feel really intuitive to me. Mostly because I'm using these indices to move to a specific window.

You can let tmux know that you rather start numbering windows and panes from one instead of zero by putting the following in your ~/.tmux.conf file.

# ~/.tmux.conf

# Start numbering windows from index 1
set -g base-index 1

# Start numbering panes from index 1
setw -g pane-base-index 1

Learn more

A great resource for learning more about tmux are its man pages. You can read them online here or from the command-line using the following command:

$ man tmux

Or take a look at this book: