What is tmux and why would you want it for frontend development?

I think it’s time more frontend and full-stack developers started using tmux, which stands for “terminal multiplexer”. But before we get into whatever “multiplexer” means, let’s consider Vim. Vim is the default text editor when writing a git commit message. A wonky terminal program that somehow makes writing 50 characters more challenging than typing them outright. You end up alt-tabbing to search how to quit this thing, because your emergency key combo Ctrl-C to close out programs… does nothing! Vim is a tough, unforgiving piece of software from a bygone era, like a treacherous ring full of magical power.

Truthfully, if you don’t know and use Vim already, I don’t intend to convince you to pick up tmux. It’s got decent mouse support but working with modal, keyboard-driven apps like vim and tmux is not easy. This article is simply an introduction to a powerful terminal tool that you might consider adding to your kit.

What is tmux?

A “terminal multiplexer” like tmux or screen lets you:

  1. Leave terminal sessions and come back to them without interrupting the running process. On a remote computer, you can run some long installation process in tmux, go offline, and come back later to see the results, e.g. the live terminal output. The computer, of course, needs to stay turned on.
  2. Manage a whole swarm of screens, split displays, dashboards at once, organized in three layers as “sessions”, “windows”, and “panes”. You can maneuver many terminal screens with home-row friendly shortcuts and manipulate your workspace with scripts and hotkeys.

This one-two punch is incredible for ops folks on the go, the “shit-is-on-fire” crew, and backend developers, but I think very few frontend (or general full-stack) developers use tmux day to day, and they should.

Why should frontend folks care about tmux?

As your dependencies swell, or if you need to bounce between contexts of work locations, home projects, and Mr. Robot terminal acting (if you work for that show, I’d do it for cheap). Jumping between contexts and saving your work is exactly what tmux is designed for. Done with work for the day? Switching to your `fsociety` IRC session? Dip out of the work context with `:d`, or detach, and then `tmux attach -t fsociety` will open a whole different bunch of windows and panes.


Oh yeah, I guess there’s a clock mode, which switches a pane from a terminal to a nice little clock in the corner of your screen.

Uh oh, it’s late!

Startup Script

Just like vim, tmux can be intimidating and is much too deep to master in one sitting. You can get the baseline skill in a day, and speed up your workflow in a week of cautious use.

Copying and pasting in tmux feels like opening and closing a spaceship airlock, but otherwise it’s a powerhouse for managing all the scripts and servers a regular web developer might need to run. tmux is a unique user experience all on it’s own, but it is heavily influenced by vim & friends. If you’re comfortable with the one editor to rule them all, you’ll have a fairly easy time adjusting to the terminal multiplexer… to rule all the terminal multiplexers.

If you’re experiencing serious amounts of clutter in your Terminal setup, I encourage you to give tmux go. Thanks for reading!

🔌 To get random ramblings about 🎛 synthesizers, 🇺🇸🇺🇦 politics, and 🎨 CSS, follow me on twitter: @tholex

Installing tmux

Code — Music — Climate