What is tmux?

tmux is a terminal multiplexer; it allows you to create several “pseudo terminals” from a single terminal. This is very useful for running multiple programs with a single connection, such as when you’re sshing into a server.

tmux also decouples your programs from the main terminal session. So, for example, if your connection breaks, or if you accidentally close your terminal window, your programs will continue to run safely in the background. Later, when you reconnect to the terminal session, you can reattach to the tmux pseudo terminal session and continue from where you left off as if you were never disconnected.