Tmux stands for terminal multiplexer. It’s a tool that lets you split a terminal window into many others. This allows you to finish your tasks much faster and manage multiple terminals at the same time to increase productivity and efficiency. In this article we´ll show you how to use the tmux cheat sheet.
So, if you’re a system administrator, listen up!
How to install Tmux?
Tmux is a very easy application to install. To do it, first you´ll have to access your VPS server. Then, you should add sudo to the command (installing Tmux requires admin privileges).
First, run this command to install:
sudo apt-get install tmux
Then confirm the installed version to ensure it installed correctly:
tmux -V
Tmux cheat sheet
The application should be ready to use. Now we´ll get into the cheat sheet and show you some basic commands you can use to get started using Tmux:
Starting/ending sessions on Tmux
To start a new session you have to type:
tmux
Starting a sesión with a name:
tmux new -s [name]
Starting an attached session:
tmux a #
If the session has a name:
tmux attach -t [name]
To list all Tmux sessions
tmux ls
Exit:
exit
Kill session:
tmux kill-session -t [name]
Window operating
Command | Description |
w | list windows and select one |
, | rename window |
c or N | create new window |
n | go to next window |
p | go to previous window |
f | find window |
& | kill window |
0-9 | go to window 0-9 |
Pane operating
Command | Description |
% | vertical split |
‘’ | horizontal split |
x | kill pane |
o | go to next pane |
h, j, k, l | go to next pane in vim-style |
z | toggle full-screen mode for current pane |
arrow keys | resize the pane |
q | show pane-numbers |
After knowing about these simple commands, your ready to use Tmux to operate your terminal more productively. Although this is just the basic you need for everyday work, you can learn more complex commands on the tmux official guide.