Byobu
keyboard shortcuts
I haven't had time to differentiate between when tmux or screen is used here. I've just continued to add this page over time without considering when I'm using screen or tmux and whether or not I have the function keys disabled for whatever reason. Some may not work due to some specific configuration idiosyncrasy with your distribution or the package. Some keybindings are definitely deprecated or no longer valid, but I've kept them here because I haven't been able to check against the "official" version yet. Use at your discretion.
Using clipboard
Copying text
- Using the keyboard (to Byobu's buffer):
- Enter scrollback mode: F7 or Alt+PgUp.
- Navigate to the text you want to copy.
- Press the Spacebar to start highlighting.
- Use the arrow keys or PgUp/PgDn to highlight the text.
- Press Enter to copy the text to Byobu's internal buffer.
- Using the mouse (to system clipboard):
- Enter scrollback mode: F7 or Alt+PgUp.
- Enable mouse mode: Alt+F12.
- Hold Shift and drag the mouse to select the text.
- Press Shift+Ctrl+C to copy to the system clipboard.
- Disable mouse mode: Alt+F12.
- Exit scrollback mode: Ctrl+C.
Pasting text
- To paste from Byobu's buffer:
- Use Ctrl+A followed immediately by ].
- To paste from the system clipboard:
- In the terminal, you can often paste using Ctrl+Shift+V.
- Alternatively, use the middle mouse button to paste if mouse mode is enabled.
Advanced: Copying to the system clipboard via configuration
- For a more seamless integration with the system clipboard, you can create a keybinding in the ~/.byobu/keybindings file.
- The following example binds Ctrl+A then b to copy the buffer to the X clipboard using xsel.
Basic
F2 or Ctrl + a + c - Create a new session
F3 or Ctrl + a + a - Go back to the previous session
F4 or Ctrl + a + n - Go to the next session
F7 or Ctrl + a + [ - Scrollback/search mode (Press Enter to exit)
F8 or Ctrl + a + A - Rename the screen
F9 or Ctrl + a + @ - Configuration menu
Utility
F5 or Ctrl + a + R - Refresh all status notifications
F6 or Ctrl + a + d - Detach from the session and logout
Ctrl + a <0-9> - Switch to screen #0-9 (quick toggle)
Ctrl + a " - View a list of the current screens, which will allow you to select one from the list
Ctrl + a \ - Kill all of the sessions and terminate
Ctrl + a ~ - Copy buffer into an editor
Split window management
Shift + F2 or Ctrl + a | - Split window horizontally
Ctrl + F2 or Ctrl + a S or Ctrl + a % - Split window vertically
Shift + F5 - Collapse all splits
Ctrl + a Tab - Focus on the next window
Ctrl + a X - Close the current window
Ctrl + a :resize +N - Increase the height
Ctrl + a :resize -N - Decrease the height
Ctrl + a :resize N - Set height
Ctrl + a :resize = - Make all windows equally high
Ctrl + a :resize max - Maximize the height
Ctrl + a :resize min - Minimize the height
Miscellaneous
Ctrl + a x - Lock the terminal
Ctrl + a d - Detach the whole screen session and fork to the background. Very useful for remote sessions you want to leave open. The command "screen -r" will resume your screen session.
Ctrl + a Esc - Scroll up through your command line "history" and see what output you previously got. Hitting <Escape> again cancels it.
Ctrl + a :help - Show screen keybindings (if using screen)
Ctrl + a + ! - Toggle f-key keybindings on
Ctrl + a + $ - Show detailed status
Alt + F12 - Toggle mouse
Possibly deprecated
Shift + F3 - Focus on next split
Shift + F4 - Focus on previous split
Shift + F6 - Detach from the session, but do not logout
Ctrl + a :resize-pane -L 20 - Resize increase left of current window pane by 20 units (other available ones are -D, -R, -U)
Ctrl + a :clear-history - clear history in the viewing buffer
Untested
Alt + F5 - Toggle UTF-8
Ctrl + F5 - Reconnect any SSH/GPG sockets or agents
Nested remote session
Shift+F12 - Toggle the outer byobu's keybindings on or off
Ctrl+a a c - Create a new session
Links
- https://gist.github.com/devhero/7b9a7281db0ac4ba683f (added on 2019-05-29)
- http://aperiodic.net/screen/quick_reference
- https://gist.github.com/jshaw/5255721