Can you please ELI5 tmux?

https://lemmy.ml/post/1931366

Can you please ELI5 tmux? - Lemmy

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.

I guess the best analogy is a "virtual desktop" but for the terminal.
It's is a program which runs in a terminal and allows multiple other terminal programs to be run inside it.

Each program inside tmux gets its own "page" or "screen" and you can jump between them (next-screen, previous-screen etc).
So instead of having multiple terminal windows, you only have one and switch the screen/page inside it.

You can also detech from the program and leave it running - so next time you log on to the server, you can re-attach to it and all your screens/sessions are still there.

Did that help?

I actually get a lot of use out of it locally. I usually have multiple sessions for different concerns and prefix + s lets me switch between them quickly using vi keybindings. I can even do prefix + w to switch to a specific window in a different session.

I don’t use vscode much lately, but when I did it was also useful sometimes to have the same window in my terminal client on one desktop in vscode’s terminal on another when switching back and forth a lot to see a browser or database client or whatever. Just having the freedom to move the session around to different applications is nice.