byobu(1)

๐Ÿ’– byobu(1) ๐Ÿ’–

okay so bestie, welcome to the byobu manual page โ€” it's byobu(1) and it's literally the blueprint for making your terminal look like main character energy. No cap, we're keeping every single fact. Periodt. โœจ

โœจ NAME โœจ

byobu โ€” wrapper script for seeding a user's byobu configuration and launching a text based window manager (either screen or tmux)

๐Ÿ“œ SYNOPSIS ๐Ÿ“œ

byobu [options]

byobu-screen [screen options]

byobu-tmux [tmux options]

Options to byobu are simply passed through screen(1) or tmux(1).

๐ŸŒธ DESCRIPTION ๐ŸŒธ

byobu is a script that launches a text based window manager (either screen(1) or tmux(1)) in the byobu configuration. This enables the display of system information and status notifications within two lines at the bottom of the screen session. It also enables multiple tabbed terminal sessions, accessible through simple keystrokes. Iconic, honestly.

byobu currently defaults to using tmux(1) (if present) as the backend, however, this can be overridden with the byobu-select-backend(1) utility. Lowkey important.

Note that BYOBU_CONFIG_DIR=$XDG_CONFIG_HOME/byobu if defined, and $HOME/.byobu otherwise.

๐ŸŒˆ BACKGROUND COLORS ๐ŸŒˆ

The background colors of the byobu status lines can be adjusted by editing the files $HOME/.byobu/color (for byobu-screen) and $HOME/.byobu/color.tmux (for byobu-tmux). The command Ctrl+Shift+F5 will change the background to a randomly selected color when running in byobu-tmux mode. Simply remove those files to return to the default color configuration. Cute, right? ๐Ÿ’…

๐Ÿ”” STATUS NOTIFICATIONS ๐Ÿ””

byobu supports a number of unique and interesting status notifications across the lowest two lines in the screen. Each status notification item is independently configurable, enabled and disabled by the configuration utility. The guide below helps identify each status item (in alphabetical order):

  • apport โ€” symbol displayed if there are pending crash reports; {!} symbol displayed on the lower bar toward the left, in black on an orange background.
  • arch โ€” system architecture; displayed on the lower bar toward the left, in the default text color on the default background color.
  • battery โ€” battery information; display on the lower bar toward the right; - indicates discharging, + indicates charging, = indicates fully charged; when charging or discharging, the current battery capacity as a percentage is displayed; the colours green, yellow, and red are used to give further indication of the battery's charge state; you may override the detected battery by setting BATTERY=/proc/acpi/battery/BAT0 in $BYOBU_CONFIG_DIR/statusrc.
  • cpu_count โ€” the number of cpu's or cores on the system; displayed in the lower bar toward the right in the default text color on the default background, followed by a trailing 'x'.
  • cpu_freq โ€” the current frequency of the cpu in GHz; displayed in the lower bar toward the right in white text on a light blue background.
  • cpu_temp โ€” the cpu temperature in Celsius (default) or Fahrenheit, configure TEMP=F or TEMP=C in $BYOBU_CONFIG_DIR/statusrc; displayed in the lower bar toward the right in yellow text on a black background; you may override the detected cpu temperature device by setting MONITORED_TEMP=/proc/acpi/whatever in $BYOBU_CONFIG_DIR/statusrc.
  • custom โ€” user defined custom scripts; must be executable programs of any kind in $BYOBU_CONFIG_DIR/bin; must be named N_NAME, where N is the frequency in seconds to refresh the status indicator, and NAME is the name of the script; N should not be less than 5 seconds; the script should echo a small amount of text to standard out, standard error is discarded; the indicator will be displayed in the lower panel, in default colors, unless you manually specify the colors in your script's output;
BEWARE, cpu-intensive custom scripts may impact your overall system performance and could upset your system administrator! In fact, you can easily copy and modify any status script usually found in /usr/lib/byobu/* to your local $HOME/.byobu/ directory.

Example: $BYOBU_CONFIG_DIR/bin/1000_uname

#!/bin/sh
printf "\005{= bw}%s\005{-}" "$(uname -r)"
  • date โ€” the system date in YYYY-MM-DD format, or you can set this to any valid strftime(3) you like in $BYOBU_CONFIG_DIR/datetime; displayed in the lower on the far right in the default text color on the default background.
  • disk โ€” total disk space available and total used on / directory; displayed in the lower bar on the far right in white text on a light purple background; override the default directory by specifying an alternate mount point with MONITORED_DISK=/wherever in $BYOBU_CONFIG_DIR/statusrc.
  • disk_io โ€” instantaneous read/write througput in kB/s or MB/s over the last 3 seconds; displayed in the lower bar toward the right in white text on a light purple background with a leading '<' sign indicating 'read speed' and '>' sign indicating 'write speed'; override the default monitored disk by specifying an alternate device with MONITORED_DISK=/dev/sdb, and override the default DISK_IO_THRESHOLD=50 (kB/s) in $BYOBU_CONFIG_DIR/statusrc.
  • distro โ€” OS/distribution name of the release running on the current system as reported by lsb_release(1) or /etc/issue; displayed in the lower bar in bold black text toward the left on a grey background; you may override the detected release with DISTRO=Whatever in $BYOBU_CONFIG_DIR/statusrc.
  • entropy โ€” a count of the system's current entropy in bytes; displayed in the lower bar toward the right in yellow text on a dark grey background; there is a leading 'e' to indicate 'entropy'.
  • raid โ€” note very prominently if there is a RAID failure detected, in red blinking text on a white background; the term 'RAID' notes that there is something wrong with the RAID, and if there is a rebuild/resync in progress, the percent complete is also shown.
  • fan_speed โ€” cpu or system fan speed as reported by lm-sensors; displayed in the lower bar toward the right in black text on a grey background; there is a trailing 'rpm' for units; you may override the detected fan by setting FAN=/sys/path/to/your/fan1_input in $BYOBU_CONFIG_DIR/statusrc.
  • hostname โ€” the hostname of the system; displayed in the upper bar on the far right in bold black text on a grey background; there is a leading '@' symbol if the username status is also enabled.
  • ip_address โ€” the IPv4 address of the system in dotted decimal form; displayed in the upper bar on the far right in bold black text on a grey background; you can override and display your IPv6 address by setting 'IPV6=1', and you can show your external ip address by setting 'IP_EXTERNAL=1' in $BYOBU_CONFIG_DIR/statusrc.
  • ip_address4 โ€” the IPv4 address of the system in dotted decimal form; displayed in the upper bar on the far right in bold black text on a grey background; you can show your external ip address by setting 'IP_EXTERNAL=1' in $BYOBU_CONFIG_DIR/statusrc.
  • ip_address6 โ€” the IPv6 address of the system; displayed in the upper bar on the far right in bold black text on a grey background; you can show your external ip address by setting 'IP_EXTERNAL=1' in $BYOBU_CONFIG_DIR/statusrc.
  • load_average โ€” the system load average over the last 1 minute; displayed in the lower bar toward the right in black text on a yellow background; set LOAD_AVERAGES=3 in $BYOBU_CONFIG_DIR/statusrc to display all three intervals (1, 5, and 15 minutes) space-separated.
  • logo โ€” an approximation of the current operating system's logo; displayed in the lower bar on the far left; you may customize this logo by setting a chosen logo with LOGO=:-D in $BYOBU_CONFIG_DIR/statusrc.
  • mail โ€” system mail for the current user; the letter '[M]' is displayed in the lower bar toward the left in black text on a grey background.
  • memory โ€” total memory available and used percentage in the system; displayed in the lower bar toward the right in white text on a green background.
  • menu โ€” a simple indicator directing new users to use the F9 keybinding to access the byobu menu.
  • network โ€” instantaneous upload/download bandwidth in [GMk]bps over the last 3 seconds; nothing is displayed if traffic is 0; displayed in the lower bar toward the left in white text on a purple background with a leading '^' sign indicating 'up' and 'v' sign indicating 'down'; override the default interface by specifying an alternate interface with MONITORED_NETWORK=eth1, and override the default units (bits) with NETWORK_UNITS=bytes, and override the default NETWORK_THRESHOLD=20 (kbps) in $BYOBU_CONFIG_DIR/statusrc.
  • notify_osd โ€” Send on-screen notification messages to screen's notification buffer.
  • packages โ€” total number of packages installed on the system; displayed in the lower bar in yellow text on a white background inside of square brackets, '[xxx]'.
  • processes โ€” total number of processes running on the system; displayed in the lower bar in white text on a dark yellow background with a trailing '&' indicating 'background processes'.
  • reboot_required โ€” symbol present if a reboot is required following a system update; displayed in the lower bar white text on a blue background by the symbol '(R)'; additionally, reboot_required will print '<F5>' in white text on a blue background, if Byobu requires you to reload your profile to affect some changes; it will also detect if your system is currently in powernap(8) state and if so print '.zZ'; if your system is currently performing an unattended-upgrade(1) you will see a white warning sign on a red background.
  • release โ€” OS/distribution name of the release running on the current system as reported by lsb_release(1) or /etc/issue; displayed in the lower bar in bold black text toward the left on a grey background; you may override the detected release with RELEASE=Whatever in $BYOBU_CONFIG_DIR/statusrc; you may also abbreviate the release string to N characters by setting RELEASE_ABBREVIATED=N in $BYOBU_CONFIG_DIR/statusrc.
  • services โ€” users can configure a list of services to monitor, define the SERVICES variable in $BYOBU_CONFIG_DIR/statusrc, a whitespace separated of services, each service should include the init name of the service, then a pipe, and then an abbreviated name or symbol to display when running (e.g. SERVICES="ssh|ssh apache2|http"); displayed in the lower bar toward the center in cyan on a white background.
  • session โ€” byobu session name (only supported in byobu-tmux(1)); displayed in the lower bar on the left in underlined black text on a white background.
  • swap โ€” total swap space and total used as a percentage of the total available; displayed in the lower bar toward the right in black text on a light green background with a trailing '%' sign.
  • time โ€” the system time in HH:MM:SS format (by default), or you can set this to any valid strftime(3) you like in $BYOBU_CONFIG_DIR/datetime; displayed in the lower bar on the far right in the default text and default background colors.
  • time_binary โ€” bestie this one is for the hard core geek only ๐Ÿ’€ it's your local system time but in binary. It needs UTF-8 support in a VERY recent version of GNU Screen, no cap. Lives in the lower bar, far right, in the default text and background colors.
  • time_utc โ€” the system time in UTC, formatted HH:MM. Lower bar, far right, dark text on a light background. cute and punctual โœจ
  • updates_available โ€” how many updates your system has waiting. Lower bar, toward the right, white text on a red background with a trailing ! sign. And if any of those updates are marked security updates? Then you get a whole two trailing exclamation points โ€” !! ๐Ÿ˜ญ like the system is yelling at you.
  • uptime โ€” total system uptime since the last boot. Lower bar, toward the right, blue text on a grey background ๐Ÿฆ‹
  • users โ€” the number of remote users logged in via sshd. It's empty if 0 users (iconic, honestly). Lower bar, toward the right, red text on a grey background with a trailing # sign. Oh and if you set USERS_DISTINCT=1, it counts the number of distinct users logged in instead โ€” rather than open ssh sessions. iykyk ๐Ÿ’…
  • whoami โ€” the name of the user who owns the screen session. Upper bar, toward the far right, bold black text on a grey background. main character energy fr fr ๐Ÿ‘‘
  • wifi_quality โ€” the connection rate and signal quality of your wifi. Lower bar, toward the right, black text on a cyan background. The connection rate comes in Mb/s and the signal quality is a percentage with a trailing %. Wanna monitor a different interface? Override the default by specifying an alternate interface with MONITORED_NETWORK=wlan0 in $BYOBU_CONFIG_DIR/statusrc ๐Ÿซถ

๐ŸŽ€ STATUS ICONS ๐ŸŽ€

okay so byobu shows its status indicators using different icons depending on your terminal encoding, and the way it does this is lowkey so smart:

  • With byobu-tmux(1) and UTF-8 encoding, you get the pretty Unicode symbols ๐Ÿ’–
  • Otherwise you get ASCII-only icons โ€” like when you're on byobu-screen(1) or a non-UTF-8 terminal.

๐ŸŒˆ Unicode Icons

(displayed when BYOBU_BACKEND=tmux and BYOBU_CHARMAP=UTF-8)

  • updates_available:
    • ! = regular updates available
    • โš  = distribution upgrades available
    • โ€ผ = security updates available
  • reboot_required:
    • โŸณ = system reboot required
    • โš  = unattended upgrade in progress
    • ๐Ÿ—น = kernel is live-patched
  • disk_io:
    • โ—‚ = disk read activity
    • โ–ธ = disk write activity
  • network:
    • โ–ด = network upload activity
    • โ–พ = network download activity
  • mail: โŒ = new mail waiting
  • session: ใ€ฃ = session indicator
  • trash: โ™ธ = items in trash

๐ŸŒธ ASCII Icons

(displayed with screen backend or non-UTF-8 terminals)

  • updates_available:
    • ! = regular updates
    • /!\ = upgrades
    • !! = security updates
  • reboot_required:
    • (R) = reboot required
    • /!\ = upgrade running
    • [/] = live-patched
  • disk_io:
    • < = read
    • > = write
  • network:
    • ^ = upload
    • v = download
  • mail: [M] = new mail
  • session: | = session indicator
  • trash: T = trash
Wanna see the detailed explanation of all your active status indicators? Press Ctrl+a $ while byobu is running. obsessed with this feature ngl ๐Ÿ”ฅ

๐Ÿ’… SESSIONS ๐Ÿ’…

Byobu names screen sessions "byobu" โ€” if you don't specify anything, that's the default, periodt.

Wanna hide a session from byobu-select-session(1)? Just prepend a . to the beginning of the session name, like:

 byobu -S .hidden

Now here's the big tea with byobu-tmux(1) โ˜• โ€” when you run byobu to attach to an already-running session, it does not, by default, reattach to that exact session object. Instead it creates a new session in the same tmux session group as the existing one. That means they share the same set of windows and panes, while giving each attaching terminal its own independent current-window focus and scrollback view. So independent focus, shared windows โ€” the way that works is genuinely so clever.

tmux names each member of the group by appending "-2", "-3", and so on to the original session's name. And the "session" status indicator (see STATUS NOTIFICATIONS above) counts every member of the group, not just one. So heads up:

  • Opening and detaching from byobu repeatedly is expected to grow this count ๐Ÿ“ˆ
  • Switching between group members with the window-switching keybindings will not show different window content, because the windows are shared โ€” yeah, that's the whole point bestie
  • Every session in the group other than the original has tmux's destroy-unattached option set, so it's automatically destroyed as soon as you switch away from it โ€” which is exactly why the indicator eventually settles back down on its own ๐Ÿงš

Now, if you want byobu to reattach to the exact same session instead of creating a new grouped one on every single invocation, just create an empty file at $BYOBU_CONFIG_DIR/.reuse-session:

 touch $BYOBU_CONFIG_DIR/.reuse-session

๐Ÿฆ‹ WINDOWS ๐Ÿฆ‹

Every open window in the screen session shows up in the upper bar, toward the far left. They're numbered, and they include indicators about activity in the window (see "activity" in screen(1) and tmux(1) for the symbol definitions). The current active window is highlighted by inverting the background/text compared to the rest of the window bar. it's giving spotlight โœจ

You can create a whole list of windows to launch at startup in $BYOBU_CONFIG_DIR/windows and $BYOBU_CONFIG_DIR/windows.tmux. These files use the exact same syntax as ~/.screenrc and ~/.tmuxrc โ€” each line specifies a window, as described in screen(1) or tmux(1).

You can also launch Byobu with unique window sets ๐Ÿ‘‘ Store them as $BYOBU_CONFIG_DIR/windows.[NAME] and $BYOBU_CONFIG_DIR/windows.tmux.[NAME], then launch Byobu with the environment variable BYOBU_WINDOWS=NAME.

For example:

 $ cat $BYOBU_CONFIG_DIR/windows.ssh_sessions
 screen -t localhost bash
 screen -t aussie ssh root@aussie
 screen -t beagle ssh root@beagle
 screen -t collie ssh root@collie

Then:

 $ BYOBU_WINDOWS=ssh_sessions byobu

For example:

 $ cat $BYOBU_CONFIG_DIR/windows.tmux.split4
 new-session 'bash' ;
 new-window -n term1 ;
 new-window -n term2 ;
 new-window -n ssh ssh 10.9.8.7 ;
 split-window ;
 split-window ;
 split-window ;
 select-layout tiled ;
 select-pane -t 0

Then:

 $ BYOBU_WINDOWS=split4 byobu

๐ŸŒˆ UNITS OF MEASURE ๐ŸŒˆ

okay so this is one of those details that matters, bestie:

byobu uses binary for capacity measurements of KB, MB, GB, and TB. That means multiples of 1024 rather than multiples of 1000, in accordance with JEDEC Standard 100B.01 for memory capacity measurements. See:

But byobu uses decimal for measurements of network data transfer โ€” meaning multiples of 1000, rather than 1024. See:

different units for different vibes, no cap ๐Ÿ’œ


โญ KEYBINDINGS โญ

byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings are:

  • 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
  • F12 โ€” Lock this terminal
  • shift-F2 โ€” Split the screen horizontally
  • ctrl-F2 โ€” Split the screen vertically
  • shift-F3 โ€” Shift the focus to the previous split region
  • shift-F4 โ€” Shift the focus to the next split region
  • shift-F5 โ€” Join all splits
  • ctrl-F6 โ€” Remove this split
  • ctrl-F5 โ€” Reconnect GPG and SSH sockets
  • shift-F6 โ€” Detach, but do not logout
  • alt-pgup โ€” Enter scrollback mode
  • alt-pgdn โ€” Enter scrollback mode
  • Ctrl+a $ โ€” show detailed status
  • Ctrl+a R โ€” Reload profile
  • Ctrl+a ! โ€” Toggle key bindings on and off (screen backend)
  • Shift-F12 โ€” Toggle byobu F-key bindings on and off (tmux backend)
  • Ctrl+a k โ€” Kill the current window
  • Ctrl+a ~ โ€” Save the current window's scrollback buffer

๐ŸŽ€ SCROLLBACK, COPY, PASTE MODES ๐ŸŽ€

Every window in Byobu has up to 10,000 lines of scrollback history โ€” yes you read that right, ten thousand ๐Ÿ˜ญ โ€” and you can enter and navigate it using the alt-pgup and alt-pgdn keys.

Exit scrollback mode by hitting enter.

You can also easily copy and paste text from scrollback mode ๐Ÿซถ Here's the routine:

  1. Enter scrollback using alt-pgup or alt-pgdn
  2. Press the spacebar to start highlighting text
  3. Use up/down/left/right/pgup/pgdn to select the text
  4. Press enter to copy the text

Then you can paste it using alt-insert or ctrl-a-]. ate ๐Ÿ’…

๐Ÿ› BUGS ๐Ÿ›

okay bestie, bug storytime, but make it useful because these are real and they will absolutely find you ๐Ÿ’€

  • old GNU Screen needs a tiny patch for Byobu colors โ€” For Byobu colors to work properly, older versions of GNU Screen require a 1-line patch to adjust MAX_WINMSG_REND in screen.c. The change is in GNU Screen's upstream source control system as of 2010-01-26, but GNU Screen has not released a new upstream version in several years. You can disable colors entirely by setting MONOCHROME=1 in $BYOBU_CONFIG_DIR/statusrc. For more information, see:
  • PuTTY F2/F3/F4 keys acting up โ€” PuTTY users have reported that the F2, F3, and F4 shortcut keys are not working properly. PuTTY sends the same escape sequences as the linux console for F1-F4 by default. You can fix this problem in the PuTTY config, Terminal -> Keyboard -> Function keys: Xterm R6. See: http://www.mail-archive.com/screen-users@gnu.org/msg01525.html
  • PuTTY + UTF-8 fixes status refresh โ€” PuTTY users should configure enable UTF-8 characters in order to fix status refresh issues. You can fix this problem in the PuTTY configuration, Window -> Translation: select UTF-8.
  • do NOT resize PuTTY to one character tall โ€” PuTTY users should avoid resizing their window to one character tall, as this can sometimes crash byobu-screen. ๐Ÿ˜ญ
  • Mac OSX terminal flashing text โ€” Apple Mac OSX terminal users have reported 'flashing text'. You can fix this in the advanced settings of the terminal application, with 'Declare Terminal As: xterm-color'.
  • Mac keyboard users may need vt100 โ€” Apple Mac keyboard users may need to specify a vt100 terminal by adding this to your OSX profile, in order to get Byobu's function keys and colors to work:
alias ssh='TERM=vt100 ssh'
  • URxvt and Ctrl+Shift+F-key combos โ€” URxvt users have reported that Ctrl+Shift+F-key combinations do not work by default, because URxvt does not send the expected escape sequences for those key chords. You can fix this by adding the following to ~/.Xresources (then running xrdb -merge ~/.Xresources):
URxvt.keysym.S-C-F1:  string:\033[11@
URxvt.keysym.S-C-F2:  string:\033[12@
URxvt.keysym.S-C-F3:  string:\033[13@
URxvt.keysym.S-C-F4:  string:\033[14@
URxvt.keysym.S-C-F5:  string:\033[15@
URxvt.keysym.S-C-F6:  string:\033[17@
URxvt.keysym.S-C-F7:  string:\033[18@
URxvt.keysym.S-C-F8:  string:\033[19@
URxvt.keysym.S-C-F9:  string:\033[20@
URxvt.keysym.S-C-F10: string:\033[21@
URxvt.keysym.S-C-F11: string:\033[23@
URxvt.keysym.S-C-F12: string:\033[24@

See: https://github.com/dustinkirkland/byobu/issues/108

  • non-UTF-8 locale? add defutf8 off โ€” Users of a non-UTF-8 locale (such as cs_CZ charset ISO-8859-2), may need to add "defutf8 off" to ~/.screenrc, if some characters are rendering as "?".
  • PS1 goes in .bashrc, not .profile โ€” Users who customize their PS1 prompt need to put this setting in ~/.bashrc, rather than ~/.profile, in order for it to work correctly with Byobu.
  • sudo(8)? use -H, bestie โ€” If you run byobu(1) under sudo(8), you must use the -H option, such that the user's $HOME directory environment variable is set properly. Otherwise, byobu(1) will create a bunch of directories in the $SUDO_USER's $HOME, but will be owned by root. To prevent this from happening, byobu(1) will simply refuse to run if $USER does not own $HOME.
  • ulimit(3) values must be suitable โ€” Byobu requires a suitable ulimit(3) values to run. If you get an error at startup saying, 'pipe: too many open files', then check your ulimit -a values, as your "open files" or "max user processes" are too low. In this case, you will probably need to run simple screen(1)

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

like, go read these next, they're the friends of this manpage:


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

This manpage and the utility were written by Dustin Kirkland <kirkland@byobu.org> for Ubuntu systems (but may be used by others). Permission is granted to copy, distribute and/or modify this document and the utility under the terms of the GNU General Public License, Version 3 published by the Free Software Foundation.

The complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL on Debian/Ubuntu systems, or in /usr/share/doc/fedora-release-*/GPL on Fedora systems, or on the web at http://www.gnu.org/licenses/gpl.txt.


that's the whole byobu(1) vibe โ€” source: byobu, version: byobu(1), dated 19 June 2009. bye bestie, go be a terminal main character ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from