tmux is necessary

Roger Siver
2 min readMay 12, 2021

At this point in programming Bootcamp, workflow improvements arent just invited, they're becoming necessary if we want to have any time to actually understand the material. Stumbling through code and checking braces is no way to spend your time, and scrolling through multiple compressed terminal tiles inside vscode takes immense breathing room that your information needs to be understood.

This is when I found tmux: in the middle of a very frustrating sprint that required 4 open bash terminals, and an MVC framework where everything was pretty much named the same. An organized Visual Studio and Terminal setup were immediately imperative to my success and any idea of what was going on. I had heard of tmux when researching such workflow improvements, and it was time.

Tmux according to the official Github is “…a terminal multiplexer. It lets you switch easily between several programs in one terminal, detach them (they keep running in the background), and reattach them to a different terminal.”

tmux allows you to split your terminal windows into however many “panes” you choose, and gives you access to an astounding number of keyboard shortcuts to manage these terminals and make workflow improvements become muscle memory as they should. You have the option to create infinite panes, and “attach” them to the viewer however necessary. Detaching allows everything you have running in that session to continue running in the background, and attaching that pane restores it exactly how it is running in the background. You can also kill a pane to totally terminate its process. Resizing panes live to fit needs becomes a breeze, and really controlling your terminal workflow from the ubuntu WSL window while keeping valuable vscode real-estate open is a manageable feat.

For a non-mac user like me these hotkeys are accessed with CTRL+b, then a sequence. From now on I’m just going to refer to CTRL +b as a prefix, it'll help when understanding official documentation

Prefix, then “ or %, will split your pane and open an additional terminal session.

Holding prefix and using the arrow keys will resize these panes by moving the window border in relation to the arrow clicked.

If you let go of prefix and immediately use the arrow keys you will change active windows.

CTRL+d initiates the detaching of the active pane

Prefix d starts a new window

Prefix then x initiates the killing of the active pane.

tmux ls shows you all active sessions of tmux

I could go on but it would be best to familiarize yourself here, after installing. https://tmuxcheatsheet.com/

Tmux is powerful, takes you away from your mouse, and is also very fun and easy to use. I’m always looking for customizable features of my workflow because it makes things less boring, tmux is my jumping-off point for that.

--

--