Live data from Hacker News

Tmux Tutorial

leimao.github.io

31–40 of 166 posts

Re: Tmux Tutorial

#31
Pro-Tip: Use it with autossh for automatically reconnecting during computer standby / internet drops. Use iTerm for a 'native' feel to tmux (ex. copy/paste, tabs, history, etc). I used to use Mosh + TMux for super durable connections and that worked beautifully. Unfortunately Mosh doesn't play well with ITerm's native integration so you can achieve a poor man's Mosh by using http://www.harding.motd.ca/autossh/.

All-together it looks something like this: Open iTerm. autossh -t myRemoteHost "tmux -CC -A"

Re: Tmux Tutorial

#32

If you're on a Mac, try tmux -CC with iTerm2. You get tmux goodness like multiple panes, persistent sessions, etc. But you also get native scrolling, native copy and paste, etc. It's what makes tmux usable for me.

Amen to this. tmux is nifty by itself but the native experience is SO much better.

Re: Tmux Tutorial

#33
I used PM2[1] as process manager for Node.js, Python services in the cloud servers. It did its job well, apart from ensuring that process is always up, it provided monitoring capabilities(incl. emails), capturing logs from the stdout among other things.

Recently I wanted to manage a Golang service, found that PM2 is not stable for it yet and I didn't want to install Node.js just for managing the Golang service; so used Tmux for it. It keeps the process up, we can get the basic process stats as in any terminal and I use external monitoring service for alerts when the service is down[2].

[1]:http://pm2.keymetrics.io/

[2]:https://uptimerobot.com/

Re: Tmux Tutorial

#34

If you're on a Mac, try tmux -CC with iTerm2. You get tmux goodness like multiple panes, persistent sessions, etc. But you also get native scrolling, native copy and paste, etc. It's what makes tmux usable for me.

And with CC mode you'll not need all that complicated shortcuts. (I'm using tmux -CC for 1 year without knowing this shortcuts)

Re: Tmux Tutorial

#35

If you're on a Mac, try tmux -CC with iTerm2. You get tmux goodness like multiple panes, persistent sessions, etc. But you also get native scrolling, native copy and paste, etc. It's what makes tmux usable for me.

Is there anything similar or comparable available on Windows?

Re: Tmux Tutorial

#36

If you're on a Mac, try tmux -CC with iTerm2. You get tmux goodness like multiple panes, persistent sessions, etc. But you also get native scrolling, native copy and paste, etc. It's what makes tmux usable for me.

tmux -CC really is great on mac, but if it worked with mosh it would be incredible.

Re: Tmux Tutorial

#37
Oh man, I love tmux.

I guess I am not a very advanced user but some of its features really appeal to me.

We use Macbooks at work and initially I used iTerm2. I've always been a heavy user of the terminal and split views. (Neo)Vim is my main editor. However, I experienced difficulties switching back and forth between my work laptop and my personal Ubuntu system at home. I switched to tmux to be able to have the exact same set up on both OS's.

Although that was my initial reason for switching; I have come to love tmux. Just the fact that I can quickly SSH into my home machine, attach to my tmux instance and continue working from anywhere is amazing.

Re: Tmux Tutorial

#38
post #12

One tip I didn't see mentioned (though it's pretty common in tmux) is to use the default window layouts for organizing multiple panes. You do this with Ctrl + b followed by esc + . esc + 1: All windows take up equal space horizontally, and stretch the full vertical width esc + 2: All windows take up equal space vertically, and stretch the full vertical width esc + 3: The first window takes up half of the screen verti…

Or just jam ctrl + b + space until it looks good.

Re: Tmux Tutorial

#39
post #2

I have been using screen for almost 10 years now, is it worth switching? I know it's not much learning but why switching when screen is not broken? It feels like there's more important stuff I can learn.

Working with multiples sessions is more convenient and ergonomic in tmux, don't know if screen caught up in this area.

Re: Tmux Tutorial

#40
Cool, a coworker showed me tmux yesterday.

One question we had was about scrolling in the tmux window and keeping the terminal output (as in Linux where I can scroll back with Shift+PageUp). Does anybody knows how that works with tmux?

Post reply on HN