It will let you:
- switch between several programs in one terminal,
- detach them, while they are running in the background,
- and reattach them to a different terminal.
Start/Attach a session
tmux new-session -A -s sessionName
- the -A flag makes new-session behave like attach-session if session-name already exists
if tmux is invoked without arguments, it will create a new session. To prevent this problem an alias may be created
alias tmux="tmux attach"
ctr-b d detaches you from the current session.
List the sessions