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
Well, not knowing what other explanations you've read but don't understand/grasp makes it a bit difficult to narrow down specifics, though to start from the beginning,
tmux
is a terminal multiplexer, what that means is that it will allow multiple sessions running concurrently under the same virtual terminal. It provides keyboard shortcuts to switch between them, or split them and display them concurrently.The biggest use case for me however (though I use an older one called
screen
out of hard to shake habits) is the ability to detach and attach at will, so that any disconnected remote sessions won't kill whatever I happen to be working on. Alternatively, I can have running sessions locally on my current machine and then I can go elsewhere and remote in and resume from where I've left off.A somewhat frowned upon use case is to use it to run "background" processes on a remote server - like a development web service that you just can't be bothered to properly package/daemonize - just open
screen
ortmux
, start it, and detach the session and it should stay running barring any other problems.I use
screen
still too, partly because it's generally installed on everything already, like vim. I hardly ever use anything but a maximised (i.e. full-terminal) screen at once, so it doesn't sound like I'm missing much from tmux.De/reattaching's extremely useful and another thing I really like in screen is being able to scroll and search the scrollbuffer.
If I was ready for an upgrade, I'd probably go for zellij.
I use
screen
as well. It is significantly faster thantmux
.in most cases screen/tmux is an overkill, I prefer using
setsid
for quick and dirty scripts, it just starts a process in a new session, detached from parent terminal. Ornohup
when I need to check the output. Both available on most linux systems by default.