Shell Configuration and ProductivityLesson 3.4
How to use tmux to manage multiple terminal sessions
tmux installation, sessions vs windows vs panes, prefix key, creating splits, switching panes, detach and reattach, named sessions, basic tmux config
tmux for Terminal Multiplexing
tmux lets you split one terminal into multiple panes, run background processes that survive closed windows, and manage long-running jobs during remote sessions.
Install and start
sudo apt install tmux -y
tmux
tmux new -s devKey bindings (prefix is Ctrl+B)
Ctrl+B % # split vertically
Ctrl+B " # split horizontally
Ctrl+B o # switch to next pane
Ctrl+B x # close current pane
Ctrl+B d # detach from sessionDetach and reattach
tmux ls
tmux attach -t devDetaching is powerful for long-running tasks: start a build, detach, close the terminal, come back later and reattach to see the output.
Basic .tmux.conf
set -g mouse on
set -g history-limit 10000Reload config: tmux source-file ~/.tmux.conf
