tmux Installation And Configuration In Mint Linux

Welcome to tmux!

`tmux` is a terminal multiplexer for Unix-like operating systems. It allows multiple terminal sessions to be accessed simultaneously in a single window. It is useful for running more than one command-line program at the same time. It can also be used to detach processes from their controlling terminals, allowing SSH sessions to remain active without being visible

Please refer the tmux official gitgub repository for more details like installation and more. https://github.com/tmux/tmux/wiki

Let's Start

  • Installing tmux in Mint linux/Debian systems
  • Updating the tmux configs

Installing tmux in Mint linux/Debian systems

We can install the tmux with following commands:

sudo apt update
sudo apt install tmux

Thats all tumx installed on your system !!!, to activate tmux, run the following command in terminal : tmux -u

Updating the tmux configs

tmux configs are stored in the ~/.tmux.conf file (If file not preset crete the file using your favorite text editor)

The first thing you should know is that Ctrl+b is the default prefix in tmux. It means that running any command requires typing in the prefix first. As you probably have guessed, this is to avoid conflicts with key combinations used in other programs run in the terminal.

Some default commands of tmux
  • Ctrl+b " :- split pane horizontally
  • Ctrl+b % :- split pane vertically
  • Ctrl+b arrow key :- switch pane
  • Hold Ctrl+b arrow key :- resize pane
  • Ctrl+b n :- move to the next window
  • Ctrl+b p :- move to the previous window
  • Ctrl+b c :- create a new window
  • Ctrl+d or type exit and press Return :- Quit tmux
Modifying tmux (~/.tmux.conf)
# Setting Default Shell
set-option -g default-shell /usr/bin/zsh
# Adjusting tmux Default Header
set-option -g status-position top
set -g status-bg blue
set -g status-fg white
set -g status-right "ziAbs"
set -g status-left ""
set-window-option -g window-status-current-bg yellow
# Setting Mouse Mode on To Select pane
set -g mouse on
# Changing the default prefix (Ctrl+b) to (Ctrl+a)
set -g prefix C-a
# Changing the Split Window Short cuts
bind d split-window -h
bind D split-window -v% 

Technology Python Programming Entertainment Python3 Linux Web-development Linux-mint Centos 7 Book
ziabs @ 07 Jun 2020