4 ms·
Tmux provides a means multiplexing a single terminal window into multiple terminals, either full screen, or like a tiling window manager. It lets you organize a
by spudlyo 2y ago
Tmux provides a means multiplexing a single terminal window into multiple terminals, either full screen, or like a tiling window manager. It lets you organize and label these terminals and provides a very flexible keyboard interface to terminal management, including history scrollback, search, etc. I started using GNU Screen in the early 90s, and over the years I have developed a keyboard muscle memory for managing multiple terminals in this fashion that is completely independent from whatever terminal program I'm using. This allows me to utilize this keyboard muscle memory if I'm using iTerm2 on macOS, Windows Terminal, or Alacrity on Linux.
Many fancy terminal programs offer some subset of these multiplexing features (like tabs) and such, but in my experience none of them are as configurable or as feature rich as Tmux.
- lynndotpy 2y agoIt's also very good if you're SSHing over an unreliable connection. The tmux terminal doesn't break when your connection does.
- michaelmior 2y agoI use tmux, but as far as unreliable connections, I've found mosh[0] to be the best solution to the problem (when you have the ability to install it). It basically runs a background process on connection not tied to the session that your client will automatically reconnect to if the connection fails. I regularly close my laptop, travel between home and work, open it back up and the connection is available almost instantly. [0] https://mosh.org/ https://mosh.org/
- oxygen_crisis 2y agoBoth together are even better... seamless persistence of your session across sleeps/connection lapses from mosh, and from tmux for everything else like switching client machines, a dead battery, a client's OS/terminal crashing, etc.
- michaelmior 2y agoAbsolutely. I personally prefer to use both together.
- adamomada 2y agoThis is exactly the same reason I had in the 90s using tmux’s precursor, GNU screen. With dialup or crappy isdn, screen -R was always the first input after login Have we gone from shitty connectivity to stable and then back to shitty?
- jprete 2y agoI don't think so! But tmux is really useful for laptop scenarios, like when the laptop goes to sleep, or if you're working on a train and it goes through a tunnel with no network reception.
- elcomet 2y agoI still use screen, is tmux better?
- Groxx 2y agoBy a decent measure, yes. It's screen plus modern QoL additions like multi-panels/windows/tabs and a giant pile more, and it's decades-stable so that's not like a "node framework of the week" pile of useful stuff that you'll have to rip out next month. It's very firmly established as a full screen successor. For strictly "keep one thing running remotely" it's not much different (screen is entirely fine), but for "do work remotely" it's like comparing `cat` and `less`. One does what the other does and a heck of a lot more that is very useful when you need it. Sure, you can use grep, but having an integrated (reversible) incremental search is hard to truly replicate from the outside. Tmux is kinda on a similar level vs screen. Personally fwiw: I almost exclusively use tmux with iterm's integration, so I don't have to learn basically any of it. I just get resumable terminal tabs and windows when I ssh anywhere, and they're still there months later when I go back. With that kind of setup it's just plain magic, a complete no-brainer, feels like what computing just obviously should be (even though it isn't). I've learned enough of the details around screen/tmux/etc to know that I'm glad to shove almost all of it over there and ignore it.
- technofiend 2y agoIt's handy even if you just need to go from work to home to Starbucks or whatever. Doesn't have to be a poor connection as much as one that changes occasionally.
- Ferret7446 2y agoYou can use shpool for this if you aren't using the other features.