Tmux a terminal multiplexer

mannuelf

Mannuel

Posted on November 4, 2023

Tmux a terminal multiplexer

Original post

Tmux is a terminal multiplexer, it allows you to have multiple processes open in multiple window panes on your server.

All the window panes can be manged from one terminal. Servers don't have fancy multi tab terminals so yeah this is the answer.

The processes will run in the background on a tmux server. The process and windows will remain open and running even when you log out of your SSH session.

You can use it on your localhost machine as well to have multiple window panes running any process, like npm run watch, npm run start or what ever your heart desires.

example

Here I have four panes opens and I can move between each pane by pressing Ctrl+b then Up or Down, Left and Right.

The leader key is Ctrl plus 'b' and some "other key".

Install

Ubuntu

Do not use snap it's outdated, the latest version lives on apt.



sudo apt install tmux


Enter fullscreen mode Exit fullscreen mode

Mac/OSX



brew install tmux


Enter fullscreen mode Exit fullscreen mode

Using it

In the terminal enter:



tmux


Enter fullscreen mode Exit fullscreen mode

This will start a tmux server and session with one window pane.

For horizontal window split: Ctrl+b %

For vertical window split: Ctrl+b "

Move up: Ctrl+b Up

Move down: Ctrl+b Down

Move left: Ctrl+b Left

Move right: Ctrl+b Right

Resize window: Press and keep pressing Ctrl+b while tapping Up or Down repeatedly this will increase/decrease window size in which ever direction you have chosen.

List all the commands Ctrl+b then :

Docs



man 1 tmux


Enter fullscreen mode Exit fullscreen mode

Deep dive the docs here

That's it have fun with it.

💖 💪 🙅 🚩
mannuelf
Mannuel

Posted on November 4, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Tmux a terminal multiplexer
tools Tmux a terminal multiplexer

November 4, 2023