How to Install and Use tmux on Ubuntu 16.0

Posted By : Mohd Adnan | 28-Feb-2018

 Are you the one to whom it fascinates working on a terminal?


Do you have a hard time switching to multiple terminals at the same moment?


Well, the solution is here - tmux


What is tmux?


According to Wikipedia - tmux is a terminal multiplexer, allowing a user to access multiple separate terminal sessions inside a single terminal window or remote terminal session

The term may sound techie, but the concept is simple: Within one terminal window, you can open multiple windows and split-views (panes in tmux lingo). Each pane has it's own individual terminal instance.




Run the following commands to install tmux


sudo apt update

sudo apt-get install tmux         


Getting started: Starting Your First Session


Once, it's installed on your OS; you just need to start a tmux session by typing 'tmux' on the terminal

tmux session


Getting hands-on tmux


The following screenshot shows how a tmux session looks like:

tmux session


The fundamental thing you should keep in mind is that Ctrl+b is the default prefix in tmux. It indicates that to run any command, you need to type a prefix Ctrl+b first. This step is taken to avoid clash with key combinations adopted in other programs operating in the terminal.


Here is cheatsheet for few basic tmux commands that will keep you going with tmux:

to split pane horizontally — Ctrl+b %  
to split pane vertically — Ctrl+b " 
to switch pane — Ctrl+b arrow key
to resize panes — Hold Ctrl+b, hold one of the arrow keys 
to (c)reate a new window — Ctrl+b c
to move to the (n)ext window — Ctrl+b n
to move to the (p)revious window — Ctrl+b p


Hope that makes you more productive. It's a great hack to make things easier. 


About Author

Author Image
Mohd Adnan

Adnan, an experienced Backend Developer, boasts a robust expertise spanning multiple technologies, prominently Java. He possesses an extensive grasp of cutting-edge technologies and boasts hands-on proficiency in Core Java, Spring Boot, Hibernate, Apache Kafka messaging queue, Redis, as well as relational databases such as MySQL and PostgreSQL. Adnan consistently delivers invaluable contributions to a variety of client projects, including Vision360 (UK) - Konfer, Bitsclan, Yogamu, Bill Barry DevOps support,, Noorisys, One Infinity- DevOps Setup, and more. He exhibits exceptional analytical skills alongside a creative mindset. Moreover, he possesses a fervent passion for reading books and exploring novel technologies and innovations.

Request for Proposal

Name is required

Comment is required

Sending message..