Your workstation inside one terminal
You do not need four terminal windows. tmux divides one window into several panes, each running its own shell or console program. This is the layout we built on a real Slackware 15.0 desktop.
cd ~/projects
ls -la
Ready for Unix mischief_
CPU 12%
MEM 1.4G
irc.libera.chat
17:20:00
Illustration only: commands, resource readings and time are examples, not a live session.
1. Open tmux
Open a terminal (Konsole works nicely) and type tmux. If tmux is already running, stay in your existing session. Check the version with:
tmux -VSafety tip: if you already have important programs running in panes, create a fresh tmux window first with Ctrl+B, release the keys, then press C. This keeps your current work untouched.
2. Create four panes using the keyboard
Start in an unsplit tmux window. The default prefix is Ctrl+B: press both keys, release, then press the next character.
- Left + right: Ctrl+B, then % (Shift+5). You now have two side-by-side panes.
- Split right: stay in the active right pane and press Ctrl+B, then " (Shift+'). The right half now has a top and bottom.
- Split lower right: while in the bottom-right pane, press Ctrl+B, then " again. That makes three panes down the right side.
At first, those three right-hand panes might be different heights. That is easy to fix.
3. Make the right panes the same size
Here's the best trick: tmux already has a preset layout for one big left pane and evenly spaced panes on the right. From any of your four shell panes run:
tmux set-window-option main-pane-width 50%
tmux select-layout main-verticalThe left side takes roughly 50% of the available width. The other three panes share the right side evenly. The layout can be a character or so different on some terminal sizes because divider lines need space too.
Already have four panes? No need to split again. Run those two commands only. For a wider main pane, change
50%to60%and reapplymain-vertical.
4. Show the built-in digital clock
Click or select the pane where you want the clock, then press Ctrl+B, followed by T (lowercase t). tmux's big clock appears in that pane.
The built-in clock is a temporary display mode, not a separate running clock program. Press q to return to the previous shell or program without closing that pane.
Want green numbers and a 24-hour clock? Run:
tmux set-window-option clock-mode-colour green
tmux set-window-option clock-mode-style 24Then press Ctrl+B, t again to see it.
5. A continuously updating clock in its own pane
For a clock that stays on screen in the bottom-right pane while other panes do their own jobs, run a command inside that pane:
watch -n 1 date '+%A %d %B %Y %H:%M:%S'Press Ctrl+C to stop it. watch is commonly available on Linux; check with command -v watch. If it is not installed, this basic shell alternative works without extra packages:
while :; do clear; date '+%A %d %B %Y'; date '+%H:%M:%S'; sleep 1; doneThe loop refreshes the pane every second and stops with Ctrl+C. It only changes the selected pane.
6. Put the time in tmux's bottom status bar
Prefer not to use an entire pane for a clock? Add a live timestamp to the right side of the tmux status bar:
tmux set-option -g status-right '%a %d %b %Y %H:%M:%S'
tmux set-option -g status-interval 1This changes the right-hand status content for the running tmux server and refreshes it each second. Note: it replaces any custom status-right text you already had; save your old setting first if you want to keep it.
7. Give your pane borders DarkPC colours
Want the pane you're working in to stand out? Make inactive borders purple and the active one bright green:
tmux set-option -g pane-border-style fg=colour60
tmux set-option -g pane-active-border-style fg=greenThese settings are cosmetic and can be changed again at any time. A few terminal themes render colours slightly differently.
8. Try something useful in each pane
| Pane | What to run | Why |
|---|---|---|
| Big left | bash or vim | Main work area |
| Top right | top | Live CPU and memory activity |
| Middle right | BitchX or irssi | Keep IRC visible |
| Bottom right | watch -n 1 date | Always-on clock |
BitchX, irssi and other third-party applications must already be installed. You can leave any pane at the normal shell prompt instead.
9. The keyboard cheatsheet
| Press | What happens |
|---|---|
Ctrl+B, % | Split left/right |
Ctrl+B, " | Split top/bottom |
Ctrl+B, arrow key | Move between panes |
Ctrl+B, q | Show pane numbers briefly |
Ctrl+B, z | Zoom the current pane; repeat to restore |
Ctrl+B, t | Show the built-in clock |
Ctrl+B, c | Create a new tmux window |
Ctrl+B, d | Detach without ending programs |
Ctrl+B, ? | See all built-in keybindings |
10. Keep your favourite colours and clock
These two commands show your current tmux configuration file and let you edit it if you wish:
ls -la ~/.tmux.conf
nano ~/.tmux.confIt's fine if the file doesn't exist yet. Add only the settings you actually want, such as:
# Optional DarkPC tmux style
set -g pane-border-style fg=colour60
set -g pane-active-border-style fg=green
set -g status-right '%a %d %b %Y %H:%M:%S'
set -g status-interval 1
set -w clock-mode-colour green
set -w clock-mode-style 24Save and reload with:
tmux source-file ~/.tmux.confThis saves the appearance options, not the running commands in each pane or the pane arrangement. For repeatable workspaces, you can create a script later. No need to overwrite an existing configuration.
Quick fixes
- Only one pane showing? You may have zoomed it. Press Ctrl+B, then z to unzoom.
- The layout changed unexpectedly? Run
tmux select-layout main-verticalagain. - The clock disappeared? tmux's big clock is an overlay. Press Ctrl+B, then t to reopen it, or use the permanent clock command.
- Commands say “not found”? Check that tmux is running (
tmux -V) and that optional programs such aswatchorirssiare installed. - Panes too tiny? Expand the Konsole window, reduce the terminal font a little, or use only two or three panes.
There you go. A full little Unix control room from one terminal window. No subscription, no cloud service and absolutely no nonsense. Welcome to the dark side. ☾