Tmux essential commands

Tmux essential commands explained navigation’s, terminal split, windows, panes and sessions. Basic navigation commands Action Shortcut / Command Description New window Ctrl+b c নতুন window তৈরি Next window Ctrl+b n পরবর্তী window এ যান Previous window Ctrl+b p আগের window এ যান Rename window Ctrl+b , Window rename করুন Close window Ctrl+b & Window বন্ধ করুন Split pane vertically Ctrl+b % Terminal vertical split Split pane horizontally Ctrl+b " Terminal horizontal split Move between panes Ctrl+b + Arrow keys Pane selection পরিবর্তন Resize pane Ctrl+b hold Arrow keys Pane size পরিবর্তন Detach session Ctrl+b d Background এ session রাখুন Attach session tmux attach পুনরায় attach করুন List sessions tmux ls Session list দেখুন Kill session tmux kill-session -t name Session delete করুন

Tmux Config Basics

This post covers basic tmux configuration, enabling mouse support, changing pane key bindings, reloading the tmux config, and adjusting window and pane index settings. You can checkout my config file # Change prefix key to Ctrl + a unbind C-b set -g prefix C-a bind C-a send-prefix # Enable mouse support set -g mouse on # Enable Vim-style copy mode setw -g mode-keys vi bind-key -T copy-mode-vi v send -X begin-selection bind-key -T copy-mode-vi y send -X copy-selection-and-cancel bind-key -T copy-mode-vi Escape send -X cancel bind -n M-v copy-mode # Vim-style pane navigation bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R # Reload tmux config without restarting bind r source-file ~/.tmux.conf # Create a new window in the current directory bind c new-window -c "#{pane_current_path}" # Split panes in the current directory bind | split-window -h -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}" # Unbind default split keys unbind '"' unbind %

Tmux Plugins

Make it look better and Must have plugins for 10x dev. Check the GitHub Dotfiles 1# .... previouse configs 2 3set -g @plugin 'tmux-plugins/tpm' 4set -g @plugin 'tmux-plugins/tmux-sensible' 5set -g @plugin 'tmux-plugins/tmux-resurrect' 6set -g @plugin 'tmux-plugins/tmux-yank' 7 8set -g @plugin 'dracula/tmux' 9set -g @dracula-show-powerline true 10set -g @dracula-plugins "cpu-usage ram-usage" 11set -g @dracula-show-gpu false 12 13run '~/.tmux/plugins/tpm/tpm' # your tmp path 14 15set-option -g base-index 1 16set-option -g pane-base-index 2 17set-option -g set-clipboard on 18 19bind -n M-Left select-pane -L 20bind -n M-Right select-pane -R 21bind -n M-Up select-pane -U 22bind -n M-Down select-pane -D 23 24set -g status-position top

Selection & Copy-Paste in TMUX

How can we copy and paste text in TMUX? Check the GitHub Dotfiles We are using the tmux-yank plugin from the previous video. To select text: Press Ctrl + b to enter TMUX command mode. Move the cursor to the start of the text you want to select. Press Space to start the selection. Move the cursor to the end of the text. Press y to copy the selection to the system clipboard. Or just drag the mouse to select text and press y to copy ...