To understand why you might want to use tmux try the following:
Open your terminal
Start editing a file with vim or nano but don’t save the file
Close then re-open your terminal
You will have lost your progress, next we can repeat but this time using tmux so you don’t lose your session:
Open your terminal
Start a tmux session using tmux
Start editing a file again using vim or nano
Close and re-open the terminal
Type tmux a to re-attach to the existing session
Note that this time none of your progress is lost.
Aside from enabling you to have a persistent session, tmux also allows you to have multiple terminal panes open so you can do more than one thing at a time in the window, to see what I mean try this:
Open your terminal
Start a new tmux session using tmux
Type top to begin listing processes
Press ctrl b then % to make a new split pane
Enter ls or other terminal commands
You will see that you can use more than one panel to do things.
This can be useful for example if you want to watch run tests and also run other commands.
To understand why you might want to use tmux try the following:
You will have lost your progress, next we can repeat but this time using tmux so you don’t lose your session:
tmux
tmux a
to re-attach to the existing sessionNote that this time none of your progress is lost.
Aside from enabling you to have a persistent session, tmux also allows you to have multiple terminal panes open so you can do more than one thing at a time in the window, to see what I mean try this:
tmux
top
to begin listing processesctrl b
then%
to make a new split panels
or other terminal commandsYou will see that you can use more than one panel to do things. This can be useful for example if you want to watch run tests and also run other commands.