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)
Edite: Ok, just to clarify, my original struggle was to understand what made tmux different from using some terminal app and just split the screen xD
Have you ever seen someone use a tiling window manager instead of a desktop environment? Where it keeps all the currently running apps on screen in evenly sized tiles so you can see everything at once, nothing is in the “background?”
Tmux is a bit like that, but only for the terminal. It allows you to open multiple terminals in one “screen” or terminal emulator window, and switch between them with keyboard shortcuts. So if you want to look at your source code, test run your source code, and watch htop to see how it performs, you can do that with Tmux. It’s a bit less cumbersome than opening three terminal windows.
It also works over SSH, so you can SSH into a server or something, start tmux, then easily run several tools simultaneously.
Tmux sessions are also persistent. Imagine if you were in the middle of working on something on your desktop at the office, then it’s time to go home. You can detach your session, SSH into the box from your laptop, reattach that session and keep working right where you left off.
If you work in the terminal a lot, it’s a handy tool.