Super User is a question and answer site for computer enthusiasts and power users. 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

screen has a Ctrl-a,Ctrl-a to switch between two latest windows?

How to do it in tmux?

share|improve this question
up vote 43 down vote accepted

To do this in tmux, you do

Ctrl-Bl

(that is an 'L'). This assumes you have left Ctrl-B as your activation key.

If you want to use the same keypresses as screen, then add the following to your ~/.tmux.conf:

set-option -g prefix C-a
bind-key C-a last-window

The first sets Ctrl-A as your activation key, the second says Ctrl-A after activation should go to the last window.

share|improve this answer

Paul's answer is correct, but it seems to leave you without a way to type ^A. Normally, if you had not bound the C-a to prefix, you simply use ^A. But you did... AND you mapped C-a C-a to be last-window, sooo....

However, all is not lost: C-a C-b now (oddly) gets you a ^A.

If you don't remap prefix, you can use C-b C-b to get ^B.

If for some reason you don't remap prefix and you map C-b C-b to last-window, I haven't figured a way to get a ^B out of it short of something like:

bind-key v send-prefix

... which will send a ^B if you type C-b v.

share|improve this answer

You must log in to answer this question.

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