Académique Documents
Professionnel Documents
Culture Documents
Ive been using tmux for about six months now and it has become just as essential to my
workflow as vim. Pane and window management, copy-mode for navigating output, and
session management make it a no-brainer for those who live in the terminal (and
especially vim). Ive compiled a list of tmux commands I use daily to help me work more
eiciently.
https://robots.thoughtbot.com/a-tmux-crash-course 1/7
16/09/2017 A tmux Crash Course
Shortcuts
If a tmux command I mention is bound to a keyboard shortcut by default, Ill note that in
parenthesis.
Theyre accessed by entering a key combination called the prefix and then typing a letter.
For example, if you see prefix + d below, that means you would first hit (and release)
Control + b and then type d .
The prefix can also be changed, which Ill show you how to do later.
Session Management
Sessions are useful for completely separating work environments. I have a Work session
and a Play session; in Work, I keep everything open that I need during my day-to-day
development, while in Play, I keep open current open-source gems or other work I hack
on at home.
tmux list-sessions
lists existing tmux sessions
Windows
https://robots.thoughtbot.com/a-tmux-crash-course 2/7
16/09/2017 A tmux Crash Course
tmux has a tabbed interface, but it calls its tabs Windows. To stay organized, I rename all
the windows I use; if Im hacking on a gem, Ill name the window that gems name. The
same thing goes for client applications. That way, I can recognize windows by context and
not what application its running.
Panes
Panes take my development time from bland to awesome. Theyre the reason I was able to
uninstall MacVim and develop solely in iTerm2. I dont have to switch applications to
switch contexts (editing, reading logs, IRB, etc.) - everything I do, I do in a terminal now.
People argue that OS Xs Cmd+Tab is just as fast, but I dont think so.
https://robots.thoughtbot.com/a-tmux-crash-course 3/7
16/09/2017 A tmux Crash Course
tmux list-keys
lists out every bound key and the tmux command it runs
tmux list-commands
lists out every tmux command and its arguments
tmux info
lists out every session, window, pane, its pid, etc.
Must-haves
Workflow
During the day, Ill work on one or two Rails apps, work on my dotfiles, run irssi, and maybe
run vim in another window to take notes for myself. As I mentioned, I run all of this inside
one tmux session (named work) and switch between the dierent windows throughout
the day.
https://robots.thoughtbot.com/a-tmux-crash-course 4/7
16/09/2017 A tmux Crash Course
When Im working on any Ruby work specifically, Ill have a 75%/25% vertical split for vim
and a terminal so I can run tests, interact with git, and code. If I run tests or git diff
and want to see more output than the 25% allots me, Ill use tmux to swap the panes and
then move into copy mode to see whatever I need to see.
Finally, I run iTerm2 in full-screen mode. Switching between OS X apps for an editor and a
terminal is for chumps!
Whats next
Take control of your terminal and build your ideal development workflow. The
tmux course on Upcase will teach you the ins and outs of tmux for terminal
mastery.
https://robots.thoughtbot.com/a-tmux-crash-course 5/7
16/09/2017 A tmux Crash Course
PRODUCTS
FormKeep
Hound
Upcase
SERVICES
Android
Design
Elixir/Phoenix
Go
iOS
Python/Django
React Native
Ruby/Rails
OPEN SOURCE
Argo
Bourbon
Capybara Webkit
Clearance
Dotfiles
Factory Girl
Laptop
Suspenders
https://robots.thoughtbot.com/a-tmux-crash-course 6/7
16/09/2017 A tmux Crash Course
More...
LOCATIONS
Austin, TX
Boston, MA
London, UK
New York, NY
Raleigh, NC
San Francisco, CA
Washington, DC
PODCASTS
https://robots.thoughtbot.com/a-tmux-crash-course 7/7