18

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? enter image description here

Cristian
  • 1,590
  • 5
  • 23
  • 38

3 Answers3

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
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