tmux Ctrl+B not working
Holding Ctrl and B followed by another command key
usually gives me nothing.
I have no .conf
file so I'm not overwriting it.
Solution 1:
This is what I use for my configuration and I have Ctrl+A as prefix key.
set -g prefix ^a
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
unbind %
bind | split-window -h
bind - split-window -v
bind N break-pane
# Set status bar
set -g status-bg black
set -g status-fg white
# Highlight active window
set-window-option -g window-status-current-bg blue
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
# Automatically set window title
setw -g automatic-rename
Test it by pressing Ctrl+A, then after that ?.
Solution 2:
I think this deserves a clear visible answer which is hidden in form of a comment under the first answer.
Assuming the default tmux configuration is being used, novice tmux users please follow the instructions below to split the pane
To split the pane horizontally
- Press Ctrl+B
- Release pressed keys in Step 1
- Press " (on many keyboards, this is Shift+')
To split the pane vertically
- Press Ctrl+B
- Release pressed keys in Step 1
- Press % (on many keyboards, this is Shift+5)
The articles I found and referenced below mention [CTRL B] + [%]
or [CTRL B] + ["]
or Ctrl+b "
which implies that we have to press all the keys together but none mentions the important part of releasing the pressed Ctrl + whatever key
before pressing the another key in sequence in the command to see the desired action.
- Tmux support arrives for Bash on Ubuntu on Windows
- tmux Tutorial - Split Terminal Windows Easily
Solution 3:
You can type the command tmux detach to detach from the session.
type tmux list-sessions to get a list of active sessions
tmux list-sessions
0: 1 windows (created Wed Feb 21 12:53:31 2018) [157x75]
1: 1 windows (created Wed Feb 21 12:55:05 2018) [157x75]
tmux attach-session -t will attach you to the session
Example: tmux attach-session -t 0