Linux tip: Using multiple terminals with byobu

Move over screen, a better terminal multiplexer is here.

By  

byobu

flickr/rolenzo

This excerpt is from the book, Ubuntu Unleashed: 2013 Edition by Matthew Helmke, published by Pearson/SAMS, Dec 2012, ISBN 0672336243; copyright 2013 by Pearson Education, Inc. For more info please visit www.informit.com/title/0672336243

[ Enter ITworld's drawing to win a copy of Ubuntu Unleashed: 2013 Edition ]

Many Linux veterans have enjoyed and use the screen command, which was designed to enable you to use one terminal to control several terminal sessions easily. Although screen has been a welcome and useful tool, a better one has appeared called byobu; it is an enhanced version of screen. Byobu is a Japanese term for decorative, multipanel, vertically folding screens that are often used as room dividers.

[Free unused memory in Ubuntu and Which Linux distro is best? Survey says: Slackware]

Picture this scene: You connect to a server via Secure Shell (SSH) and are working at the remote shell. You need to open another shell window so you can have the two running side by side; perhaps you want the output from top in one window while typing in another. What do you do? Most people would open another SSH connection, but that is both wasteful and unnecessary. Like screen, byobu is a terminal multiplexer, which is a fancy term for a program that enables you to run multiple terminals inside one terminal.

The best way to learn byobu is to try it yourself. So, open a console, type byobu, and then press Enter. Your display blinks momentarily and is then replaced with a new console with new information in a panel at the bottom. Now, do something with that terminal. Run top and leave it running for the time being. Press F2. Your prompt clears again, leaving you able to type. Run the uptime command.

Pop quiz: What happened to the old terminal running top? It is still running, of course. You can press F3 to return to it. Press F4 to go back to your uptime terminal. While you are viewing other terminals, the commands in the other terminals carry on running as normal so you can multitask. Here are some of the basic commands in byobu:

  • F2—Create a new window

  • F3—Go to the previous window

  • F4—Go to the next window

  • F9—Open the Byobu menu for help and configuration

To close a terminal within byobu, simply log out of it normally using exit or Ctrl+D. When you exit the last terminal session that is open in byobu, the program closes as well and drops you to the regular terminal session you used to start byobu.

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Spotlight on ...
Online Training

    Upgrade your skills and earn higher pay

    Readers to share their best tips for maximizing training dollars and getting the most out self-directed learning. Here’s what they said.

     

    Learn more

Operating SystemsWhite Papers & Webcasts

See more White Papers | Webcasts

Answers - Powered by ITworld

ITworld Answers helps you solve problems and share expertise. Ask a question or take a crack at answering the new questions below.

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Ask a Question