Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

In a byobu screen, I ssh'ed into another computer and launched byobu on that computer. Now, I have byobu within byobu.

How can I send byobu keystrokes (F2, F3, F6, etc) to the inner byobu rather than the outer? In other words, how do I escape or otherwise transmit these keys to the screen rather than having the outer byobu intercept them?

share|improve this question
up vote 11 down vote accepted

For byobu-within-byobu, you need to know the original, non-f-key bindings for each of the f-key commands.

So for F6, for example, that's really ctrl-a-d for detach.

You can then send the detach signal to the inner session using ctrl-a-a-d. And that scales well with the depth of the nested sessions. So for byobu-within-byobu-within-byobu, you'd use ctrl-a-a-a-d.

There is an alternative, which is what I personally use... You could set a different escape key for the inner byobu. I typically use ctrl-a for the outer one, and ctrl-b for the inner one. In this way, ctrl-a-d would detach the outer session, and ctrl-b-d would detach the inner session.

share|improve this answer
Dustin, how could one configure byobu to set this? – philipyassin Jul 20 '13 at 21:38
You can use the byobu-ctrl-a helper command to set your escape key, and change it back and forth. – Dustin Kirkland Jul 22 '13 at 13:26
Shift-F12                   Toggle on/off Byobu's keybindings

Keystrokes will be send to the inner byobu.

share|improve this answer
This seems more user friendly than typing ctrl-a-a-d (I always got it wrong), since once you type Shift-F12 byobu tells you that its key bindings are disabled. After that, you can for example type F6 to exit a nested session. – gerlos Sep 29 '14 at 17:43
This is best answer for those who only use f commands. – Sumit Jain Apr 6 '15 at 8:52

Ctrl-A or F12 works with a single byobu, but I'm not sure about a byobu within a byobu. See:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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