-
-
Save oeeckhoutte/7943908 to your computer and use it in GitHub Desktop.
Tmux Commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tmux commands | |
Time to play around with tmux commands: | |
Ctrl-b c Create new window | |
Ctrl-b d Detach current client | |
Ctrl-b l Move to previously selected window | |
Ctrl-b n Move to the next window | |
Ctrl-b p Move to the previous window | |
Ctrl-b & Kill the current window | |
Ctrl-b , Rename the current window | |
Ctrl-b % Split the current window into two panes | |
Ctrl-b q Show pane numbers (used to switch between panes) | |
Ctrl-b o Switch to the next pane | |
Ctrl-b ? List all keybindings | |
Ctrl-b n (Move to the next window) | |
Ctrl-b p (Move to the previous window) | |
Ctrl-b l (Move to the previously selected window) | |
Ctrl-b w (List all windows / window numbers) | |
Ctrl-b <window number> (Move to the specified window number, the default bindings are from 0 – 9) | |
Ctrl-b % (Split the window vertically) | |
Ctrl-b : “split-window” (Split window horizontally) | |
Ctrl-b o (Goto next pane) | |
Ctrl-b q (Show pane numbers, when the numbers show up type the key to goto that pane) | |
Ctrl-b { (Move the current pane left) | |
Ctrl-b } (Move the current pane right) | |
Using TMUX | |
First let's open some windows and panes, hit Ctrl-b c and then Ctrl-b , to rename the window (just think of a random name). To switch between these windows you can use Ctrl-b p and Ctrl-b n (next and previous window respectively). Then if we want to split this window into two panes, we use Ctrl-b %. To navigate between panes we can just use Ctrl-b "arrow key" or Ctrl-b q and then hit the number of the right pane. To automatically arrange the panes hit Ctrl-b "SPACEBAR". | |
Configuring Tmux | |
In your homefolder create a file called | |
.tmux.conf | |
. In here we can set multiple tmux parameters. For instance this my (edited) tmux configuration: | |
set-window-option -g utf8 on | |
set -g default-terminal screen-256color | |
set -g status-bg black | |
set -g status-fg white | |
set -g status-interval 1 | |
set-option -g pane-active-border-fg green | |
set-option -g pane-active-border-bg black | |
set-option -g pane-border-fg white | |
set-option -g pane-border-bg black | |
set-window-option -g window-status-fg yellow | |
set-window-option -g window-status-bg black | |
set-window-option -g window-status-attr dim | |
set-window-option -g window-status-current-fg red | |
set-window-option -g window-status-current-bg default | |
set-window-option -g window-status-current-attr bright | |
set -g status-left '#[fg=green]#H#[fg=red]:#[fg=white]#S #[fg=green]][#[default]' | |
set -g status-right "#[fg=gray,bright]#(whoami)#[default,fg=white,bg=black]|#[fg=white,bg=black,bright]%a %d.%m.%Y %H:%M:%S#[default]" | |
set -g status-right-length 50 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment