In tmux you can switch to window 2 with prefix_key + 2. I'd like to press rather prefix_key + u.

I tried in .tmux.conf this:

bind-key u 2

and this:

bind-key u select-window -t 2

Which doesn't work. Is it possible to create such mapping?

1 Answer 1


You need to include a colon to select based on index. Try this:

bind-key u select-window -t :2
  • This doesn't help.
    – xralf
    May 12, 2012 at 13:10
  • Did you reload your .tmux.conf? Also keep in mind window index are zero based unless you change with: set-option -g base-index 1
    – pengwynn
    May 12, 2012 at 13:17
  • I exited tmux and lxterminal several times. I know it's zero based.
    – xralf
    May 12, 2012 at 13:24
  • 1
    tmux instances share the same tmux session, _.tmux.conf is only read when the session is started. Make sure that the tmux list-sessions list is empty, or explicitly run source-file ~/.tmux.conf after starting tmux.
    – Thor
    May 12, 2012 at 13:52
  • @Thor Thanks a lot. source-file was necessary.
    – xralf
    May 12, 2012 at 17:12

You must log in to answer this question.

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