3 ms·
If you want to get a taste of the benefits of tmux without having to learn anything new, I recommend using iTerm and setting up an alias for 'ssh [your serve
by mambodog 10y ago
If you want to get a taste of the benefits of tmux without having to learn anything new, I recommend using iTerm and setting up an alias for
'ssh [your server] -t "tmux -CC attach || tmux -CC"'
Just running that command will connect to your server and attach to an existing tmux session, or create a new one if needed, and make use of iTerm's tmux integration, so you can use the standard macOS keyboard commands (or the UI) to do things like switch tabs, make new tabs, close them, make new windows, etc. all using tmux and a single ssh connection. You can press 'esc' in the command window to detach from your session and when you return (just using that alias) all your work is just as you left it.
- fulafel 10y agoAre there terminal emulators on other platforms that offer similar tmux integration?
- xemdetia 10y ago'tmux' is actually something that runs server-side if you are ssh'ing into something, it should work with any terminal emulator the same way as GNU screen would if you ever used that, e.g. PuTTY works fine for tmux.
- michaelmior 10y agoI believe the parent was referring to iTerm's native understanding of tmux windows which is certainly not supported in all terminal emulators.
- fredsir 10y agoI never knew about this. Thanks! When I do this, it opens a new window with the "attached tmux running inside" and the old window is running in "tmux mode". Is it possible to not have a new window open, but use the window where the command is run instead?
- blfr 10y agoUse mosh[1] instead of ssh for superior handling of weaker connections and roaming. You close your laptop one place, go elsewhere, switch to LTE, whatever, open the lid and you're back on. Don't even need to reconnect. [1] https://mosh.org/ https://mosh.org/