I am fairly familiar with Linux, I’ve been using different distros for some years now and have done some config editing here and there. I am also a web developer and use the terminal quite a lot and so I always stumble on people’s recommendation to use tmux and how good it is, but I never really understood what it does and, in layman’s terms, how can it be useful and for what use cases.
Can you guys please enlight me a bit on this?
Thank you.
Edit: if my phrasing is a bit awkward or confusing I apologize since I am not an English native speaker. (Maybe that’s why I never fully grasped what tmux is from other explanations xD)
People have already made lots of good replies but here’s my summary:
tmux is a terminal multiplexer. It allows multitasking in command line only environments. For example if you have to do a sudo apt upgrade but don’t want to leave your ssh client logged in until it finishes, you can run it in a tmux session so it will happen in the background even if you’re not logged in.
To start a new session, type “tmux”
To view running sessions, type “tmux list-sessions”
To switch to a running session, type “tmux attach-session -c N” where N is the number of the session.
To exit a tmux terminal and go back to the main terminal, do ctrl+b and then press d.