Tmux, basic commands and usage
How to install tmux in Archlinux/Manjaro
To install tmux in Archlinux/Manjaro you only need to type in the terminal:yaourt -S tmux
How to start using tmux
Opening a tmux session
Tmux works with sessions, if you know screen you are familiar with this kind o sessions. How to create a session:tmux new -s main
What does this command? It creates a session (-s) with a label called main. Label are useful if you have several sessions running.Detaching from a tmux session
Detaching from a session means that tmux will keep running this session (as well as the programs running on it), but you will not see it. Really useful to keep it running in a server with something you do not want to loose even if the connection fails. To detach from a session simply type control + b and afterwards dAttach to a tmux session
Attaching to a session means that we will join again to a session we detached before. To do that you simply type:tmux attach -t main
What does this command? It attaches to (-t) to a session with label main.Demo of creating, detaching and attaching to a session
Inside tmux, basic steps
Split window horizontal
To split horizontally the window we only need to press: control + b and “Split window vertical
To split vertically the window we only need to press: control + b and %Moving between windows
To move between windows we only need to press: control + b and an arrow key one time.Resizing windows
To resize a window we only need to press: control + b and arrow key several times.Demo of splitting, moving and resizing windows
Create a new tab in the session
To create a new tab and move to it we only need to press: control + b and c. Check in the bottom of the terminal that you can see how many tabs do you have and what do they have focused.Go to next tab
To go to the next tab we only need to press: control + b and nGo to previous tab
To go to the previous tab we only need to press: control + b and pDemo of creating and swapping tabs
Well, that was the basics. You can do plenty more in tmux, but for that you will have to use change the config file. As always, if people wants to know more about it and how to configure it, please leave a comment.