TLDR: tmux is a terminal multiplexer, meaning it allows you to run multiple terminal sessions, each composed of windows which can be split both vertically and horizontally into panes.
I recently came across several getting started articles on tmux and decided to augment my existing workflow to take advantage of it. After getting over the initial hurdle of learning the tmux specific commands, things have been great. Below is a brief overview of what
tmux is, how to use it and also highlight some of it’s features.
tmux is a terminal multiplexer, meaning it allows you to run multiple virtual terminal sessions. Sessions are completely separate work environments. I create different named sessions for each project I’m working on. This is useful because as long as you don’t re-boot your computer, you can detach from the session and attach to the session at will while preserved context: working directories, command history and processes.
Each session can have multiple windows that provide a tabbing interface. With them you can quickly move switch windows using keyboard shortcuts similar to how you
Alt+Tab between OS windows.
Panes allow you to split your windows into multiple panes both vertically and horizontally. This is great for viewing multiple command line utilities or scripts in development without hiding them behind tabs or making them background processes.
Out of the box
tmux has sane defaults however you can customize it with your own configuration file. Below is my
I often work on several different client and personal projects throughout the day. By naming both my
tmux sessions and windows, I’m able to switch between them quickly and get back to right where I left off with my preserved command history in each pane. In addition, I usually split my windows into 2-3 panes so I have visibility of the
stderr streams from my development tools. This gives me visibility into what’s happening vs. hiding them with background processes or terminal tabs.
tmux to my development workflow has been a great improvement over what I was doing, making me more productive. Hopefully you’ll find it as useful as I have.
Category: ToolsView Comments