Hacker News new | ask | show | jobs
by blakesterz 3737 days ago
Speaking as someone who doesn't use it, but understands it well, the one and only thing that excites me is the persistence of sessions, if your connection drops, you can reconnect and everything is still there. Love that idea. Everything else is solved that I know it does well (for me) by using tabs. I could very well be missing other things, I know it does quite a bit, but most of the things I see other people use it for is solved by tabs (for me at least).
3 comments

This is the big thing for me. I used to work almost exclusively on a remote dev machine, using my laptop as a terminal, and tmux meant I could pick up in the morning where I left off the day before. Now, I work on a desktop, but I've gotten used to using tmux and using it locally means I can ssh to my work machine from home and, again, pick up where I left off.
Session sharing is also handy in specific cases. It supports both read only, and read/write shared sessions.

The other feature that's used often is the general scriptability that the command line options make possible. "send-keys" for example can be useful...it sends keystrokes to specific named sessions.

Doesn't mosh do that as well (or better)?
I kind of see what you mean, but tmux and mosh are completely different things and have (almost?) completely different use cases. Mosh is replacement for ssh.

Without talking about the other huge benefits of tmux, mosh only helps (and was designed to) prevent disconnections and other inconveniences when your internet connection falters. If for example your terminal unexpectedly closes you can't reconnect to your ongoing mosh session (this is an intended feature for security reasons).

Tmux on the other hand wouldn't help against a poor internet connection, but at least if your terminal or your ssh session closes you can just restart another one and wouldn't lose anything.

In other words, always use tmux, and tmux+mosh if your internet connection is poor.

mosh only supports reattaching from the originally started client - no attaching from different machines, no resuming sessions after reboots, etc. Also no splits, and no scrollback.

It's also extremely slow. Fullscreen terminals on my 30" display are borderline unusable with mosh.