background preloader

Tmux up and running

Facebook Twitter

Less Perplexing Terminal Multiplexing with tmux. Tmux has been getting a lot of attention lately.

Less Perplexing Terminal Multiplexing with tmux

As George Nachman works toward a deeper integration of iTerm2 with tmux, more people are becoming aware of the ‘other’ terminal multiplexer. Around the office, people have been asking how I use tmux. While I’m also an avid iTerm2 user, I’m not sure if the new ‘deep integration’ will be worth the additional complexity. Tmux is useful enough on its own. As a professional problem solver, I spend a considerable portion of my day working at a command prompt. Installing tmux I use homebrew to manage packages on my machine. Source packages can also be found on the project website. Getting Started with tmux Concepts Before diving into the details of using tmux, it’s good to have a mental model of how some of the pieces fit together.

Tmux operates on a client/server model. Multiple clients can connect to the same server and access either the same or different sessions (and switch between them). Let’s review with an example and get started. Phew. TL;DR? Practical Tmux. Today I switched over completely from GNU Screen to the more modern BSD-licensed alternative, tmux.

Practical Tmux

After making sure that tmux had replacements for all Screen's key features, I took the plunge, and haven't looked back. The project's webpage has a complete list of features available under tmux, but as an everyday user of Screen, here are the major reasons I switched: Better redraw model: I use Awesome WM, a tiling window manager, and terminals containing Screen sessions would glitch out regularly; spewing all kinds of artifacts into their windows. Sufficed to say, tmux doesn't do this.Screen contents persisted through full-screen programs: in Screen, you lose your terminal's previous contents after leaving a full-screen program like an editor.

Tmux doesn't have this problem.Rational configuration: I once tried to configure my screen's status line, and eventually just gave up. C-b Now there's a prefix that you have to reach for! Tmux: A Simple Start. A few times a year, I find something that transforms or enhances my development environment.

Tmux: A Simple Start

Examples in the past few years are: Github , vim, and zsh (more specifically, on-my-zsh .) Sometime in the last year or so, I started using another development transformer: Tmux . What is tmux? According to its site: tmux is a terminal multiplexer. I first learned about tmux from Evan Light (@elight) when I engaged him topair program with me eons ago. In all likelihood, you’ve probably already heard of tmux. Simple Install To start, you’ll need tmux (DERP). Mac OSX Use Homebrew. brew install tmux and you’re done. Ubuntu/Debian There is a Ubuntu package so, sudo apt-get install tmux will work, but the installed package is 1.7 and we really want 1.8.

. $ sudo add-apt-repository ppa:pi-rho/dev $ sudo apt-get update $ sudo apt-get install tmux It is not a huge deal if you cannot get 1.8 or don’t want to go through adding a PPA. Windows Type the following to make sure all is well. A Tmux crash course: tips and tweaks. ~ Intro If you are one of those devs who uses the terminal a lot and ends up with way too many tabs open, or practices pair programming, then this post is for you.

A Tmux crash course: tips and tweaks.

During the last months, I’ve started using Tmux a lot. Since I’ve found it to be very useful, I thought I would write a post where I share a few recommendations and pro-tips. I’ll show you what Tmux is and how to use it in combination with Vim to make a more effective and elegant use of the Terminal. So, this is what we’ll cover: Tmux basics.The best of Tmux WindowsPanesSessionsFast text navigation and copyingAnd a very neat pair programming featureTweaks to improve Vim integration. An important thing to bear in mind, this is the tool stack I had installed while writing this post, I tested what I say here with these versions: Tmux 1.9aVim 7.4iTerm 2.1Mac OS (Mavericks and Yosemite) Let’s start! ~ The Basics. 10 Killer Tmux Tips. In this article, I bring you ten of my favorite tmux tips.

10 Killer Tmux Tips

For those unfamiliar with tmux, SitePoint Ruby Editor Glenn Goodrich has written an excellent overview of the basics. Today, I am going to show you the tips and tricks I use with tmux on a daily basis, as well as how tmux can improve the workflow of your Ruby development. If you are a vim user, you will be in for a treat. Tip #1: Always Have a tmux Session On Getting into a new habit is always an uphill battle. The above example works with iTerm2 on Mac OSX. The line above attempts to connect to a previously created session called base, or creates a new one (also called base) if it doesn’t exist. Tip #2: Multiple Pane Synchronization The video above shows four panes loaded with REPLs of four different languages. Obviously, this demonstration is a mere party trick to impress developers and nothing more. Tmux shortcuts & cheatsheet · GitHub. Tmux shortcuts & cheatsheet start new: tmux start new with session name: tmux new -s myname attach: tmux a # (or at, or attach) attach to named:

tmux shortcuts & cheatsheet · GitHub