03_Byobus split personality

November 20, 2018 in linux ‐ 2 min read

One of byobus most useful features is to split the shell. This is where the name and logo come from, a Byōbu is a Japanese folding screen.

image

If you split the shell vertically using Ctrl + a ---> % the similarity gets quite obvious.

image

Those splitt off areas in your window are called “Pane” (singular) or “Panes” (plural). The new right hand shell gets started as a separate shell.

Even if I changed into the context of root before sending the split shell command the shell will be started as a normal user. This is because the initial byobu session has not been started as root.

image

With a split command you always split the pane that you are in currently. UsingCtrl + c ---> | you can split the current pane horizontally.

image

You can switch from one pane to another using Ctrl + a ---> Arrowkey The direction of the arrow defines where you jump to.

If you use the arrow keys in a fast manner you can jump multiple panes. In this example I first press Ctrl + a and then in a fast motion Arrow Up, Arrow Left.

[video width=“788” height=“560” mp4=“https://blog.hackzenwerk.org/wp-content/uploads/2018/11/4.mp4”][/video]

If you start a command in a pane it keeps running, even if you switch into another one. I will start htop in this example, switch into the upper pane to check the disk usage with watch df -h. (Watch repeats a command every 2 seconds and df -h means disk free human readable)

Then I update the sources and run an upgrade using apt update && apt upgrade -y

[video width=“1014” height=“696” mp4=“https://blog.hackzenwerk.org/wp-content/uploads/2018/11/5.mp4”][/video]

Also you can resize the pane that you are in right now using Shift + Arrow Keys.

[video width=“1148” height=“760” mp4=“https://blog.hackzenwerk.org/wp-content/uploads/2018/11/6.mp4”][/video]

Using these techniques you can customize multiple windows with multiple panes in all of them suited to fit your needs. One for Network and Firewall settings, one in wich you are working with docker, one for scripting etc…

Cheers, Ori