How To Split, Create and Close Tmux Screen In Linux? – POFTUT

How To Split, Create and Close Tmux Screen In Linux?

Tmux is great tool which saves system administrators from a lot of unnecessary workloads. Tmux is creating multiple screens, split current screen and maybe the best part even ssh is closed it resumes to work and after reconnect we can resume from where we were.

Open Tmux

We will start tmux terminal emulator simply providing it to bash. We will see a screen like below. We can see that there is a bar below the screen which provides some information like the window list, active window, hostname, time and date.

Open Tmux

Open Tmux

Control Shortcut

During the usage of the tmux terminal, we will use a control keyboard shortcut in order to create new windows, split them. This is CTRL+B .

Split Tmux Screen Horizontally

We will split tmux screen horizontally and create new work windows. We will use CTRL+B and after % . As we know CTRL+B is default function tool

Split Tmux Screen Horizontally

Split Tmux Screen Horizontally

Split Tmux Screen Vertically

Similar to the previous example but the split will occur vertically. The cursor will move to the newly created tmux window.

Split Tmux Screen Vertically

Split Tmux Screen Vertically

Create New Tmux Pane

We will create a new pane next to the current pane. We can see below in the status bar there is 3 panes named with bash and numbered as 1, 2 and 3.

Create New Tmux Window

Create New Tmux Window

Navigate To The Previous Window

We can navigate with and keys

Kill Pane

To kill a tmux pane CTRL+B x key combination is used. We will be asked the question “kill-pane 0”. We have to answer with y which means yes to kill currently active pane.

Kill Pane

Kill Pane

LEARN MORE  Linux Bash Alias and Shortcuts

Leave a Reply

Your email address will not be published. Required fields are marked *

Enjoy this blog? Please spread the word :)