The default command C-b l to switch between two latest windows doesn't work on my Ubuntu 16.04. But it works if set bind-key l last-window after started tmux server.

I tried to set the bind key command in ~/.tmux.conf: bind-key l last-window or bind-key a last-window

C-b l still doesn't work, but C-b a works.

Why C-b l doesn't work? How to trace the issue?


How to switch between two latest windows in tmux?

Ubuntu tmux manual

  • It works for me in Kubuntu 16.04 (I use F1 instead of C-b). – Gribouillis Aug 20 '17 at 8:21
  • @Gribouillis, Thanks for your comments. I tried with F1 as the prefix key, it is the same for Ubuntu 16.04. F1 l doesn't work, but F1 a works. I want to keep the default prefix key. So any idea? – Peter Aug 20 '17 at 12:29
  • Did you check by typing C-b : to enter command mode, then list-keys ? – Gribouillis Aug 20 '17 at 13:07
  • @Gribouillis, yes, I checked with list-keys, only bind-key -T prefix a last-window is display, but defalut prefix l is not – Peter Aug 20 '17 at 13:34
  • Try perhaps bind-key 'l' last-window (with quotes) – Gribouillis Aug 20 '17 at 13:37

Try to remove ~/.tmux.conf as in this thread.

List my steps: 1. find the bind key with tmux list-keys | grep "prefix l" 2. If exists with another command, remove it from .tmux.conf and restart your tmux; if it does not exist, your setting for bind key is not effective.

  • I edited the answer and list my steps here. I didn't use tmux kill-server – Peter Aug 21 '17 at 8:49
  • @user1086907 Now I don't understand the second step. In your case, what was the result of tmux list-keys | grep "prefix l" ? Also you removed the ~/.tmux.conf didn't you? – Gribouillis Aug 21 '17 at 8:54
  • 1
    I restore the ~/.tmux.conf after found that the issue caused by it, then tmux list-keys | grep "prefix l", and found that the shortcut is bound for another command. – Peter Aug 21 '17 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.