Is there a shortcut key to close a tab?
I'm asking for something like creating a tab CTRL b + c
What shortcut should I use if I would like to close the 1:cmatrix*
tab?
Asked
Active
Viewed 2.2k times
3 Answers
32
I think this is what you are looking for: http://www.dayid.org/os/notes/tm.html
Specifically this part:
kill the current pane: ^b x OR (logout/^D)
close other panes except the current one: ^b !
The formatting here is simple enough to understand (I would hope).
^ means ctrl+, so ^x is ctrl+x. M- means meta (generally left-alt or escape)+,
so M-x is left-alt+x

Webbies
- 947
- 9
- 17
-
Thank you Webbies. This is what I was looking for. – Cristian Oct 08 '15 at 17:08
-
1"" kill the current pane: ^b x OR (logout/^D) "" = Ctrl+b x – Jun 22 '19 at 02:55
-
Additionally, you can also do ```^d``` or just type ```exit``` after you have quit (```^c```) the current running program in the terminal. – Matt Popovich Feb 17 '21 at 02:10
10
prefix+x: kill the current pane
prefix+&: kill the current window
Note the difference between pane and window. OP actually wants to kill a window. So prefix+& will be better suited especially when a window has multiple pane splits.

TDHTTT
- 157
- 1
- 7
0
It is not precisely the question but I reached this pane needing it. If you want to close a pane from another you can try listing the panes and killing it from id.
tmux list-panes
Should return something like:
0: [209x67] [history 284/2000, 167338 bytes] %2 (active)
1: [209x19] [history 722/2000, 256904 bytes] %1
Simply use this to kill the one you want:
tmux kill-pane -t #PANENUMBER

user21306452
- 1
- 1