Useful tmux infos, commands and config
screen is dead, long live tmux! tmux plays the same role as screen, only better.
Download tmux from its homepage, deflate the archive and follow the installation instructions. Basically, it is a simple:
./configure
make
sudo make install
If you want to use tmux on a server where you do not have administration rights, it is probably easier to ask the system admin to install the latest version for you.
tmux is pretty configurable and a few additions make it much more usable. Please find the file tmux.conf
in this repository. It is a minimal configuration that improves functionality. Copy it to your home folder as .tmux.conf
(do not forget the dot (.
) before the name.
NOTE: The following examples will suppose that you have installed the config file.
- Basic session:
tmux
- Nammed session (better):
tmux new -s <session-name>
Because of our configuration, you won't be able to exit tmux using Ctrl-D
, which is a good thing because you can otherwise quit multiple windows and sessions by mistake if you hold Ctrl-D
too long. To quit, type:
logout
The two following cheatsheets are absolutely great, so I let them deal with the details of how to use tmux. I also add a link to the official manual.
Some aliases to add to your ~/.bashrc/
or equivalent file:
alias ta='tmux attach'
alias tn='tmux new -s'
alias lo='logout'
You can then use ta
to attach to tmux and tn <session-name>
to create a new session.