Friday, January 15, 2010

GNU Screen and byobu


GNU Screen is a terminal multiplexer which allows you to run multiple console based applications within a single terminal. With screen there isn't a need to have multiple terminal windows open and if you're running in console mode you won't need to worry about running out of console.

Screen is extremely helpful when administering a remote machine allowing you to have multiple consoles through a single SSH tunnel. It also allows you to detach from a console and exit you SSH session and reattach to the console either locally or another SSH tunnel.


The GNU Screen manual describes the application as such:
Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells. Each virtual terminal provides the functions of the DEC VT100 terminal and, in addition, several control functions from the ISO 6429 (ECMA 48, ANSI X3.64) and ISO 2022 standards (e.g. insert/delete line and support for multiple character sets). There is a scrollback history buffer for each virtual terminal and a copy-and-paste mechanism that allows the user to move text regions between windows.

The biggest issue I've had with screen (since I don't use it daily) is trying to remember all of the command in order to operate it proficiently, this is were byobu comes in.
Byobu is a Japanese term for decorative, multi-panel screens that serve as folding room dividers. As an open source project, Byobu is an elegant enhancement of the otherwise functional, plain, practical GNU Screen. Byobu includes an enhanced profile and configuration utilities for the GNU screen window manager, such as toggle-able system status notifications.

Here are some of the features you will have by using byobu:
  • Screen Window List
  • Battery Status
  • CPU count/frequencies
  • Current date/time
  • Disk Space
  • hostname
  • IP Address
  • Load Average
  • Memory usage
  • Network Transfer speed
  • Running Processes count
  • WiFi quality

You are also able to configure colors, status notifications, key-bindings, create and manage windows. All this is just a key press away, by using F9 you will be able to bring up the configuration menu.

Command Cheatsheet

Byobo respects all screen commands which are invoked using Ctrl-a (this is displayed as C-a below)
  • C-a C - Create a new screen window
  • C-a A - Rename the screen
  • C-a C-a - Go back to the previous window
  • C-a <0-9> - Switch to screen #0-9 (quick toggle)
  • C-a " - View a list of the current screens, which will allow you to select one from the list
  • C-a ' - Enter a screen number to switch to (slower version of C-a <0-9>)
  • C-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.
  • C-a <Escape> - Scroll up through your command line "history" and see what output you previously got. Hitting <Escape> again cancels it.

I would like to thank x_fausto for publishing a great article on byobu which introduced me to such a great product.

Software Pages:

References and other useful articles

1 comment:

  1. [...] up we have “GNU Screen and byobu“. I would like to again thank x_fausto for publishing a great article on byobu which [...]

    ReplyDelete