38

I started to use byobu, and find the it really cool thing.

It has a lot of hot keys. But I couldn't find one of them, and I stuck with one tricky point.

With F2 - you create a new window, but how to close this window when you don't need it anymore?

Later I found cool analogy for new window creation - just divide window and - shift-F2

And you can revert it back - ctrl-F6.

64

You can either type exit, or use Byobu's keybinding for killing windows/panes, which is Ctrl-F6.

Full disclosure: I am the author and maintainer of Byobu.

  • 1
    This even works when you can't type exist because the tab is frozen. – Konrad Höffner Sep 2 '15 at 8:57
  • 2
    @KonradHöffner exit. – pjvandehaar Sep 12 '15 at 18:31
  • 2
    The question actually asks for closing the whole window at once, not just panel by panel. And either exit, Ctrl+6 or Ctrl+D close panel by panel. Isn't there a way to close all panels from a window at once @dustin-kirkland ? – Akronix Sep 23 '16 at 9:36
  • 2
    I found that the suggested shortcut, Ctrl-F6, doesn't work on Mac OS X (maybe because of some system keyboard shortcut). Anyways it works perfectly on Ubuntu. – gerlos Feb 6 '17 at 19:12
19

ctrl + a, then k

If it asks for confirmation, type y and hit enter.

  • 2
    On Byobu 5.17 (Ubuntu 12.04), with a frozen command prompt, this is the only answer that worked for me. – pjvandehaar Sep 12 '15 at 18:29
  • And this works on the TTY too, where shift commands don't. You saved my day ! – Moonchild Jan 6 '18 at 10:56
6

If there are no more jobs running in the window, then you can use Ctrl+D to close it.

  • 1
    What is there are jobs running and you want to kill them all? <kbd>Ctrl</kbd>-<kbd>F6</kbd> doesn't work for me. – lid Mar 30 '14 at 2:51
  • @lid you can ctrl+c, or from other terminal using kill, pkill or killall. Ctrl+D send the EOF character (AKA ^D, \04, 0x4), send the signal to end the input stream to tty. – Pablo Bianchi Mar 3 '18 at 18:29
4

Type "exit" at the command prompt.

  • I tried this one - this doesn't work. I have read about this at man pages but this didn't work. – nazar_art Feb 4 '14 at 20:17
  • When I use "exit" on my Ubuntu VMs with Byobu, it closes the current window and goes to the previous (assuming I have more than one). If I only have one, then it closes the entire SSH session. – Xavier J Feb 4 '14 at 20:19
  • at Lubuntu 13.10 this doesn't work. – nazar_art Feb 4 '14 at 20:21
3

In my view, if you are using screen correct method is to use by pressing

Ctrl + a d

ie, press Ctrl + a then d then type

exit

So when you type byobu you can resume the session. For more details refer.

How do I get out of a screen without typing 'exit'?

3

There is no direct command for closing a window in Byobu if it has many splits in it. However there is a nice workaround. Press Shift+F9. This will pull up a prompt for sending the command to all splits of the current window. Now just type exit and huzzah!!

This will however not work if one of the splits has something running in it. In that case, manually close such splits by pressing Ctrl+F6 several times.

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.