Last Updated: September 09, 2019
·
560
· akagr

Increase productivity with tmux

Use of screen sharing software is often limited by the connection speed. Not all of us have google fiber at home. Since I am more or less always at terminal for pretty much everything, here is a solution that works wonders for me.

We are all familiar with ssh. But it basically has different instances of terminal so that we cannot see someone's action live. Tmux (Terminal MUltipleXer) is great tool for sharing terminal sessions between team members and also for resuming anything from anywhere. Install it using apt-get or yum or whatever awesome package manager you might be using.

On one machine (say Machine A), we create a tmux session via:

tmux new -s session1

Where session1 is obviously the session name. Now we ssh into Machine A from some other machine (say Machine B) and attach our terminal to same session via:

tmux attach -t session1

Here -t stands for target. And with this we are done. Talk about collaboration! Now multiple team members can work on files together with real-time feedback. It also enables resuming the work exactly as we left it. Moreover, the sessions are persistent and do not close if someone closes the terminal. We can also create multiple instances inside same session (multi-tabs?) and can even split same window into multiple panes.