•
How to use Byobu
By Alex • 2 minutes read •
TLDR: A cheatsheet for Byobu keybindings.
Introduction
Byobu offers functionality similar to tmux, enabling users to manage multiple terminals through a single interface. Essentially, it serves as a terminal multiplexer and session manager.
Such a tool proves invaluable when interacting with a server via SSH. Instead of launching a new terminal and establishing a fresh server connection each time you require an additional terminal, you can configure your server to initiate Byobu or tmux at the onset of your session, giving you access to as many terminals as desired. A standout feature of Byobu is its ability to maintain terminal sessions even after detaching from them.
Byobu enhances the terminal experience by leveraging either Screen or tmux, depending on your preference. It provides users with valuable statistics and offers intuitive hotkeys for essential commands.
Installing Byobu
For Ubuntu users:
For MacOS users:
Else take a look at https://www.byobu.org/downloads
Start Byobu
Configure Ubuntu to run Byobu from the beginning
You’re encouraged to customize settings as per your preferences.
Locate the “Byobu currently launches at login (toggle on)
” setting and select it, followed by pressing return.
Afterward, navigate back to the menu and exit byobu-config
(move to the exit option using the tab key and press return).
Resume previous sessions
Hotkeys
Byobu has user-friendly keybindings based on the function keys:
- F2: Create a new window
- F3: Move to previous window
- F4: Move to next window
- F5: Reload profile
- F6: Detach from this session
- F7: Enter copy/scrollback mode
- F8: Re-title a window
- F9: Configuration Menu, can also be summoned by Ctrl+a, Ctrl+@
- F12: Lock current session
Understanding Detaching and Session Maintenance
Here’s a brief demonstration. SSH into another machine. There you launch Byobu and run a command:
Subsequently, press F6 to detach from Byobu. Next, execute: exit
.
Upon reconnecting via SSH to your machine, you’ll observe the echo hello command still displayed. The act of detaching doesn’t terminate your session; rather, it grants you entry to another. This means you can initiate a prolonged task, detach, and return later to inspect the results.
Note for vim users
Vim users may notice an odd behavior when employing Ctrl-Left and Ctrl-Right keys jump between words in vim and other applications.
A remedy I’ve found effective is:
References
[1] http://www.saltycrane.com/blog/2012/10/how-start-long-running-process-screen-and-detach-it/
[2] http://tmux.sourceforge.net/
[3] https://www.byobu.org/documentation.html
[4] http://www.howtogeek.com/58487/how-to-easily-multitask-in-a-linux-terminal-with-byobu/
[5] http://blog.smartlogicsolutions.com/2010/01/22/ubuntu-byobu-landscape/
[6] https://cheatography.com/mikemikk/cheat-sheets/byobu-keybindings/