How to Access Multiple Terminals Inside a Single Console using Tmux Terminal

To Access Multiple Terminals Inside a Single Console using Tmux Terminal

In this article we will discuss about how to Access Multiple Terminals Inside a Single Console using Tmux Terminal. Terminator helps to spilt a single window into multiple terminals for different tasks

To install tmux terminal multiplexer

For Debian/Ubuntu and derivatives:
aptitude update & & aptitude install tmux

For CentOS/RHEL/Fedora

yum update & & yum install tmux

INSTALLATION

[root@linuxhelp ~]# yum install -y tmux 
Loading mirror speeds from cached hostfile
 * base: centos.excellmedia.net
 * epel: epel.mirror.net.in
 * extras: centos.excellmedia.net
 * updates: centos.excellmedia.net
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
-->  Running transaction check
--->  Package tmux.x86_64 0:1.6-3.el6 will be installed
-->  Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package              Arch                   Version                     Repository            Size
====================================================================================================
Installing:
 tmux                 x86_64                 1.6-3.el6                   epel                 208 k
...
...
...
...
...
Installed:
  tmux.x86_64 0:1.6-3.el6                                                                           
Complete!
Now the Installation is completed.


To start a new tmux session

[user1@linuxhelp]$ tmux new -s linux 


OPTIONS
Ctrl + b + " - splitting horizontally

Ctrl + b + % - splitting vertically


Ctrl + b + left - move from one to another
Ctrl+up , Ctrl+right , Ctrl+down - to move with the same direction.
Ctrl + b - resize a pane
Ctrl + b + t - to show the current time inside the active pane
Ctrl + b + x - to close the current pane
Ctrl + b + d - to detach from the current session

To create new session

tmux new -s admin

To detach from admin and attach to session

tmux attach -t linux

To switch to admin

tmux switch -t admin

FAQ
Q
tmux utilizes excessively CPU. What do I do?
A
Programmed window renaming may utilize a considerable measure of CPU, especially on moderate PCs: if this is an issue, turn it off with "setw -g automatic-rename off". On the off chance that this doesn't settle it, if you don't mind report the issue.
Q
which Option helps to split the tmux terminal vertically and horizontally?
A
Following keys helps to split the tmux terminal.
"Ctrl + b + " For horizontally ,
"Ctrl + b + % " For vertically.
Q
how to start a Tmux new session?
A
you can use $tmux new -s to start a new session using Tmux terminal.
Q
What is the option for resizing tmux terminal?
A
use following keys, it helps to resize the tmux terminal
"Ctrl + b"
Q
What is the shortcut to terminate the tmux current session?
A
You can press "Ctrl + b + x", It kills the current tmux session.