tmux is a software application that can be used to multiplex several virtual consoles, allowing a user to access multiple separate terminal sessions inside a single terminal window or remote terminal session.
In simple terms, it allows you to execute long-lived processed that should continue to run after you disconnect from the SSH session.
sudo pkg install tmux
to start a new session, or
to attach to an existing session.
You can create a new window by pressing
C-b c (so press
Ctrl-b and then just
c). Switching to the next window can be done with
C-b n and switching to the previous is achieved with
C-b p. For the many other options, see the References section below.
For more information about keybindings and other issues, check the man page: