← Back to list

How to Split Your Linux Terminal Into Two Panes on the Same Screen

One terminal window. Two working areas side by side. No second window. No alt-tab. Here is exactly how to do it

Sabit in Bash_DevOps_AI · 2026-07-03 11:30 · 21 claps · 3.1 min read paywalled
#linux #terminal #devops #programming #sre
Open on Medium ↗
Wiki topics: 💻 · Programming ☁️ · DevOps & Cloud 🔓 · Open Source

How to Split Your Linux Terminal Into Two Panes on the Same Screen

One terminal window. Two working areas side by side. No second window. No alt-tab. Here is exactly how to do it

Photo by Agon Mustafa on Unsplash

Photo by Agon Mustafa on Unsplash

Most people work in one terminal at a time. They run a command, wait, run another. When they need to watch logs while editing a file, they open a second terminal window and switch between them.

There is a better way. You can split your terminal into two separate working areas on the same screen, each running its own independent session. Edit a file on the left. Watch logs update in real time on the right. No switching. No second window.

The tool that does this is tmux. You may have seen it in the previous article on keeping commands running after closing the terminal. Splitting your screen is one of its most useful features.

Install tmux if you haven’t already

sudo apt install tmux

Confirm it’s installed:

tmux -V

Start a tmux session

tmux new -s work

This starts a new session called “work.” You’ll see the green status bar appear at the bottom of your screen. That bar confirms you’re inside tmux.

Everything from here happens inside this session.

Split your terminal vertically into two side-by-side panes

Press and fully release Ctrl+B. Then press %.

Ctrl+B  →  release  →  %

Your terminal splits down the middle. Left pane and right pane. Both are fully independent terminals. Both run simultaneously.

Split your terminal horizontally into top and bottom panes

Press and fully release Ctrl+B. Then press ".

Ctrl+B  →  release  →  "

Your terminal splits across the middle. Top pane and bottom pane. Same independence. Same simultaneous operation.

You can combine both. Split vertically first, move to one pane, then split that pane horizontally. Three working areas in one window.

Move between panes

Press Ctrl+B then an arrow key in the direction of the pane you want.

Ctrl+B  →  ←  (move left)
Ctrl+B  →  →  (move right)
Ctrl+B  →  ↑  (move up)
Ctrl+B  →  ↓  (move down)

The active pane gets a highlighted border so you always know where your keystrokes are going.

A real working example

Here is a practical setup for watching logs while running commands.

Start tmux and split vertically.

tmux new -s monitor

Press Ctrl+B then % to split.

In the left pane, follow a live log file.

tail -f /var/log/syslog

Press Ctrl+B then to move to the right pane.

In the right pane, run your commands normally. The left pane continues updating in real time while you work on the right.

That setup alone replaces the habit of opening two terminal windows and constantly switching between them.

Resize a pane

Hold Ctrl+B, then hold an arrow key. The pane border moves in that direction.

On some systems this requires pressing Ctrl+B first, then holding the arrow key after releasing. If one approach doesn't work, try the other.

Close a pane

Type exit in the pane you want to close, or press Ctrl+D. That pane disappears. If it's the last pane in the session, the session ends.

Close one pane without closing the session

Ctrl+B  →  x

Tmux asks you to confirm. Press y to close the pane.

Zoom into one pane to focus

When you need to focus on a single pane without distraction:

Ctrl+B  →  z

The current pane expands to fill the entire window. Your other panes are still running, just hidden. Press Ctrl+B then z again to zoom back out and see all panes.

Detach from the session without closing it

As covered in the previous article, press Ctrl+B then capital D then Enter to detach. All panes keep running in the background. Come back to them anytime.

tmux attach -t work

Everything is exactly where you left it.

A layout to start with right now

Open your terminal and run this sequence:

tmux new -s split

Split vertically: Ctrl+B then %

Move right: Ctrl+B then

Split that pane horizontally: Ctrl+B then "

You now have three panes. Left takes half the screen. Top right and bottom right each take a quarter. One window. Three independent terminals. All running at the same time.

Once you start working this way, a single terminal pane starts feeling cramped.

Most people learn Linux commands. Few learn how to think. Every Wednesday in Terminal to AI I share one practical terminal skill and one sharp lesson about information, decisions, and building a life that actually pays. Former smart contract auditor. Learning in public. Free to join. **Terminal to AI →**


메타데이터
post_id
584270d4f7f0
slug
how-to-split-your-linux-terminal-into-two-panes-on-the-same-screen-584270d4f7f0
url
https://medium.com/my-lifes-mirrow/how-to-split-your-linux-terminal-into-two-panes-on-the-same-screen-584270d4f7f0
canonical_url
https://medium.com/my-lifes-mirrow/how-to-split-your-linux-terminal-into-two-panes-on-the-same-screen-584270d4f7f0
author_url
https://medium.com/@tibas
status
ok
fetched_at
2026-07-09 03:40:04