hpr1968 :: Advanced Terminal Usage: byobu
Use this screen multiplexer wrapper to optimize your usage of the terminal, locally, and abroad.
Hosted by Jon Doe on Wednesday, 2016-02-17 is flagged as Explicit and is released under a CC-BY-SA license.
byobu, bash, terminal, ssh, remote, linux.
(Be the first).
The show is available on the Internet Archive at: https://archive.org/details/hpr1968
Listen in ogg,
spx,
or mp3 format. Play now:
Duration: 00:03:16
general.
Long time listener, first time caller, here! My name is Jon Doe, but you can call me Jon.
Today, I am going to be talking about a more advanced usage of the terminal in linux. This basic tutorial assumes that you have a basic knowledge of getting to the terminal, and installing software, so we can skip that, and make my job easier.
First, you have software that you may want to run, and keep running, even if we disconnect, or even if we walk to another machine. Classically, there was 'screen' for this, but times change, and needs advance. My current favorite is byobu, a wrapper for the screen or tmux terminal multiplexers, tmux by default, now, which is a change since featured on episode 770 of HPR.
To run byobu, simply type it's name at the terminal, and watch it's magic. When we say it is a wrapper, this is in double context. It encapsulates the tmux or screen binary in script, and it provides some useful enhancements to the already awesome capabilities of a basic multiplexer, including a nice bar at the bottom, detailing the system stats, configurable to whatever stats you need to display.
A screen multiplexer is an application that allows the running of multiple terminals, and their applications, within a single remote or local window, allowing you to change tasks with relative ease, similar to a window manager in X, but with no mouse needed.
For a basic test, go ahead and hit F2, and you will get a second terminal, the textual task tray at the bottom indicating your current and available terminals. F3 and F4 allow you to cycle between tasks, and F2 spawns additional.
For those following along, go ahead and hit F6, you will drop back to a shell, with byobu running everything in the background, and you can exit the terminal, or run whatever else you need to, outside of byobu's control. Use the byobu command again to reconnect, note that your session has remained open, and all terminal sessions are available for you to peruse. Also note that you can open byobu again, as the same user, both remotely and locally, and keep all of your terminals going, even on multiple systems and screens, at the same time. You can even share the session with others, assuming their ability to login, and cross code, or monitor usage of their session, for educational purposes, or group coding.
A popular and useful feature of terminal windows is the ability to maintain a scroll back buffer, and using a multiplexer, ostensibly, destroys this ability on the graphical side, assuming you are using it in a graphical environment, keeping the text for itself. Fear not, good hacker, for the simple application of F7 will activate scroll back mode, and allow your cursor (or arrow) and page keys to scroll up and down the text buffer. Enter settles you back to the end, allowing quick access to whatever just happened in that specific task windows while you were away.
This has been an introduction to advanced terminal usage, brought to you by Jon Doe.
And for those NPR nerds out there, "This is HPR, Hacker Public Radio"