Tag Archives: productivity

tmux – an awesome little tool

If you do a lot of programming from the Linux console, you’ll certainly appreciate the power of tmux. It is a terminal multiplexer, which means that it can create multiple virtual consoles within a single terminal shell. Since these virtual consoles are not bound to a terminal, they will keep running in the background, even if you close the terminal you started it in. This means that you can detach these consoles, and re-attach them in another terminal session.

For example, imagine you are working on some project on a development server. You log into that server over SSH from your office, create a tmux session, and do your coding in vim in there. Then you detach the session, and log out from the server to go home. Back at home, you log into the development server again, and re-attach the tmux session, and you see the vim session back where you left it. Not that I suggest you to work from home, but it is a good example of how you can continue your work or session from anywhere.

Tmux in action. Two vim sessions and a MongoDB console.
Tmux in action. Two vim sessions and a MongoDB console.

Another great thing about tmux is that you can create multiple sessions within the same terminal window, and move between them, something like alt-tabbing between terminal windows, except it is much faster and with less visual distraction. An added bonus is that tmux is able to subdivide the visible portion of your terminal window into parts, so you can have multiple virtual consoles, all visible within one window. Very useful if you have lots of screen estate at your command, so that you can code in vim in one, access a MySQL console in another, and doing a sass --watch in yet another, for example. All the information you need, everything visible in the same window, for optimal productivity.

Continue reading tmux – an awesome little tool