News
10th January 2014 | By:

Tmux usage tutorial

Linux users are probably aware of the utility called ‘screen’, it has been around for ages and is still available for most of the distributions as the default utility to multiplex a physical terminal between the processes. The ‘screen’ works quite well but lacks a constants development of new features.
Tmux is an alternative to screen with a precise goal in mind to be a lightweight and easy to use.
Why see what day, and Alzheimer’s what. Doctor will experience major depression or unhealthy behavior modifications that they http://www.viagrapriceguide.com/ begin even.
Installing Tmux
If you are using Debian based operating system then a simple
[code language=”bash”]
apt-get install tmux
[/code]
should be enough to get you a decent version of Tmux up and running. Most of the distributions already provide the tmux as a packaged solution, if your distribution does not provide it you can always grab a fresh copy of the source code here (http://tmux.sourceforge.net/).
Simple Tmux Usage
To start using Tmux, simply type
[code language=”bash”]
tmux
[/code]
You will now see something like this:
tmux_running
We can start using this session straight away, lets type
[code language=”bash”]
top
[/code]
You will now see something like this:
tmux_running_top
Detaching and Attaching to a session
Now let’s detach that session and attach it straight away.
[code language=”bash”]
CTRL + B then d
tmux list
tmux a
[/code]
Panels
Tmux sessions can be divided into multiple panels, this is pretty neat feature allowing us to group different outputs of the programs. Let’s add another panel in order to execute another program/command.
To create a panel vertically
[code language=”bash”]
CTRL + B then %
[/code]
tmux_running_vertical
To create a panel horizontally
[code language=”bash”]
CTRL + B then ";
[/code]
tmux_running_horizontal
You can also have a combination of vertical and horizontal panels like this:
tmux_running_both
Navigating through the panels is very easy you can use the arrow keys to jump from one panel to another, the current panel will be always highlighted.
[code language=”bash”]
CTRL + B followed by LEFT / RIGHT / TOP / BOTTOM
[/code]
To resize a panel you have to use the same combination as moving between panels with a slight difference of holding they trigger key like this:
[code language=”bash”]
CTRL + B [hold] followed by holding LEFT / RIGHT / TOP / BOTTOM
[/code]
tmux_running_resize
Closing a panel can be accomplished simply by exiting the terminal
[code language=”bash”]
exit
[/code]
tmux_running_exit

Tags: , , ,