Comment on page
tmux / byobu
How to stay connected.
Instead, we need to run them in a sort-of background terminal (technically it's called a terminal multiplexer).
tmuxdo exactly that. So the idea is that you ssh into your remote computer, then you start
tmux) if it's your first connection, otherwise you can "attach" to the existing session by typing
As a bonus, we can also split our screen into multiple "windows" and "panes" and have a different shell in each of these. For example, you can keep the log files open in a lower pane and run the commands in an upper pane. See the images below for examples.
byobuis actually just a wrapper around
tmux, which gives some better defaults and a nice-looking status prompt.
byobuis available by default on ubuntu and many ubuntu tutorials refer to it.
tmuxis basically the same thing but a little more "raw". On the other hand,
tmuxtends to be more widely available on non-ubuntu systems.
The big difference comes down to the "command key", with
When observing, you can use byobu (byobu.org) to split your terminal into multiple smaller panels with different processes running in each. That way, you can view the running POCS and log files all at once, which is especially convenient when logging in remotely. It also allows other people on your team to join the same byobu session and see how the unit is doing.
By default, byobu should already be installed on Ubuntu. To attach, enter byobu in a new terminal window on the NUC. Then, you can jump between panels by pressing
CTRL-a, letting go, then pressing an arrow key
↑ ↓ → ←in the direction you want to move. More commands (ie. splitting screens, resizing screens, creating windows etc) are listed below.
The commands are the same for
tmuxbut instead of
\- kill byobu (& all running processes)
CTRL-d- detach without kill (or just close the terminal window)
c- create new window
k- kill current window
p- goto previous window
n- goto next window
[window number]- goto to a specific window (see bottom bar of terminal for all window numbers)
%- split current panel vertically
|- split current panel horizontally
TAB- next panel
↑, - switch panels (with arrow keys)
↑, - resize panels vertically
←, - resize panels horizontally
Scroll up page buffer
CTRL-athen [ - scroll with
↓arrows, then press
If you’re on a team, try to make your terminal as large as possible (
) when using byobu, since you might restrict the size that the session appears to anyone else attached. See pic below.
If more than one person is connected the screen will resize to the smallest display.