Friday, August 21, 2015

How to install and use tmux on Lubuntu


What is tmux? tmux is a terminal multiplexer, it allows us to run multiple program in one console (terminal). Basically with tmux we can have several windows inside a console.

If you work with console/terminal on lubuntu/ubuntu a lot then you will find tmux very useful. In this article i will show you how to install and how to use tmux on lubuntu/ubuntu.

How to install tmux

Okay, first we need to install tmux on our lubuntu/ubuntu operating system, here's the command:

sudo apt-get install tmux

How to use tmux

Open up your console/terminal by pressing CTRL + ALT + T, once you are on console/terminal, simply type command tmux.

tmux
You will be on tmux mode like this:


Now let's create new console window inside tmux vertically, simply press:

CTRL + B and then immediately press SHIFT + %

If you press correctly, you should see two console window, left and right, like this:

You can also create new console window on the bottom of each console window (horizontally), simply press:

CTRL + B and then immediately press SHIFT + :
Here's the result:


Alright, next you need to know how to move around between those console windows. To move to the any console window, simply press:

CTRL + B and then immediately press Q and then quickly press number from 0-9

This one is little bit tricky, but once you get used to it will be easy to do. There is also command to switch between two window quickly, which is:

CTRL + B and then immediately press N or P

To exit/quit from tmux, simply press:

CTRL + B and then immediately press D

There are many other shortcut key on tmux which i can't show you all in this article, but you can learn them by reading the manual.

Having tmux on your lubuntu/ubuntu is very important for someone who work with console/terminal a lot like myself.

No comments:

Post a Comment