Complete Tmux Guide for NetBSD 10.1
text📦 Installation (if not already installed)
pkgin install tmux
or
pkg_add tmux
🚀 Basic Startup Commands
tmux # Start new session
tmux new -s name # Start session with specific name
tmux a # Attach to last session
tmux a -t name # Attach to specific session
🎮 Shortcuts (Prefix Key)
All tmux commands start with Prefix (default: Ctrl+b)
Sessions
Prefix + d– Detach from current sessionPrefix + s– List sessionsPrefix + $– Rename current session
Windows
Prefix + c– Create new windowPrefix + n– Next windowPrefix + p– Previous windowPrefix + 0-9– Go to specific windowPrefix + ,– Rename current windowPrefix + &– Close current window
Panes
Prefix + %– Split verticallyPrefix + "– Split horizontallyPrefix + arrow– Navigate between panesPrefix + x– Close current panePrefix + z– Zoom current pane (toggle)Prefix + space– Toggle layouts
💻 Useful Terminal Commands
tmux ls # List active sessions
tmux kill-session -t name # Kill specific session
tmux kill-server # Kill all sessions
⚙️ Basic Configuration (~/.tmux.conf)
# Recommended settings for NetBSD
set -g default-terminal "screen-256color"
set -g history-limit 10000
set -g mouse on # Enable mouse (tmux 2.1+)
Custom shortcuts
bind-key -n M-Left select-pane -L
bind-key -n M-Right select-pane -R
bind-key -n M-Up select-pane -U
bind-key -n M-Down select-pane -D
🐧 NetBSD 10.1 Specific Tips
1. Color Issues
If you have color problems:
export TERM=xterm-256color
2. Compatibility Check
tmux -V
3. Clipboard on NetBSD
- Select text with mouse
Prefix + [to enter copy mode- Space to start selection, Enter to copy
Prefix + ]to paste
4. Auto-start
Add to ~/.profile:
if [ -z "$TMUX" ]; then
tmux attach -t default || tmux new -s default
fi
🔧 Troubleshooting Common Issues
- Keys not working: Use
tmux -2to force 256 colors - Mouse problems: Disable in
.tmux.confif not working - Stuck sessions:
tmux kill-serverand restart
Note: These commands work well on NetBSD 10.1. The tmux version in standard repositories is generally stable and complete.
Leave a Reply