127
Can you please ELI5 tmux?
(lemmy.ml)
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
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 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.
Not super useful on your local machine - but when you have to connect to a remote server (or several) is really shines. Especially if you have to go through a jumphost. You can just connect to your jumphost, start tmux, then create a "screen" for each server you need to connect to - do your stuff and deattach. Next time, just re-attach and all your stuff is there.
Did that help?
Ok, now I guess I am seeing the value of it, specially with the "virtual desktop" analogy and the remote scenario, since I need to do some of it at work and having everything as I left it last time will be nice. Thank you!
plus, if you disconnect in the middle of a command execution it doesn't get killed (very important for system updates for example)
…. or if you get disconnected by, say, dodgy internet connection or such.
Mosh is really good for that as well. It's like the tmux of ssh