TMUX에서 창을 종료하는 방법?
TMUX에서 창을 종료하는 방법? 접두사가있는 화면 의 Ctrlak바로 가기 와 같습니다 .Ctrla
Kent의 답변은 귀하의 질문에 완전히 대답했지만 tmux의 구성을 GNU Screen과 유사하게 변경하려면 다음을 수행하는 데 사용한 tmux.conf가 있습니다.
# Prefix key
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# Keys
bind k confirm kill-window
bind K confirm kill-server
bind % split-window -h
bind : split-window -v
bind < resize-pane -L 1
bind > resize-pane -R 1
bind - resize-pane -D 1
bind + resize-pane -U 1
bind . command-prompt
bind a last-window
bind space command-prompt -p index "select-window"
bind r source-file ~/.tmux.conf
# Options
set -g bell-action none
set -g set-titles on
set -g set-titles-string "tmux (#I:#W)"
set -g base-index 1
set -g status-left ""
set -g status-left-attr bold
set -g status-right "tmux"
set -g pane-active-border-bg black
set -g pane-active-border-fg black
set -g default-terminal "screen-256color"
# Window options
setw -g monitor-activity off
setw -g automatic-rename off
# Colors
setw -g window-status-current-fg colour191
set -g status-bg default
set -g status-fg white
set -g message-bg default
set -g message-fg colour191
시도 Prefix
+&
당신이 가지고 있다면
bind q killp
에서 해당 창에 패널이 하나만있는 경우에만 + 를 .tmux.conf
눌러 창을 강제 종료 할 수 있습니다 .Prefix
q
접두사의 기본은 위에있는 Ctrl + b, 그래서 당신이 사용할 수있는 기본적으로 창을 종료 Ctrl +b &
<Prefix>
&
창문을 죽이기 위해
<Prefix>
x
판유리를 죽이기 위해
창이 하나만있는 경우 (예 : 창이 여러 개의 창으로 분할되지 않은 <Prefix>
x
경우 창을 종료 함)
As always iterated, <Prefix>
is generally CTRL+b
. (I think for beginner questions, we can just say CTRL+b
all the time, and not talk about prefix at all, but anyway :) )
Generally:
tmux kill-window -t window-number
So for example, if you are in window 1 and you want to kill window 9:
tmux kill-window -t 9
For me solution looks like:
ctrl+b q
to show pane numbers.ctrl+b x
to kill pane.
Killing last pane will kill window.
If you just want to do it once, without adding a shortcut, you can always type
<prefix>
:
kill-window
<enter>
While you asked how to kill a window resp. pane, I often wouldn't want to kill it but simply to get it back to a working state (the layout of panes is of importance to me, killing a pane destroys it so I must recreate it); tmux provides the respawn
commands to that effect: respawn-pane
resp. respawn-window
. Just that people like me may find this solution here.
Lot's of different ways to do this, but my favorite is simply typing 'exit' on the bash prompt.
ctrl + d
kills a window in linux terminal, also works in tmux.
This is kind of a approach.
참고URL : https://stackoverflow.com/questions/7771557/how-to-terminate-a-window-in-tmux
'IT' 카테고리의 다른 글
NPM이 종속성을 설치할 수 없음-잠기지 않은 것을 잠금 해제하려고했습니다. (0) | 2020.05.12 |
---|---|
Instant와 LocalDateTime의 차이점은 무엇입니까? (0) | 2020.05.12 |
jQuery가 아닌 크로스 브라우저 JavaScript 맨 위로 스크롤 (0) | 2020.04.25 |
dockerfile을 사용하여 개인 git repo 복제 (0) | 2020.04.25 |
CSS – 백분율 높이가 왜 작동하지 않습니까? (0) | 2020.04.25 |