Install tmux with and Without Root Access

Install tmux with Root Access

sudo apt-get install tmux

*Tested on Ubuntu 18.04 LTS

Install tmux without Root Access

Download bash script from Sudhir Mitharwal 


Execute the script and follow the instruction

chmod +x

*Tested on Ubuntu 16.04 LTS

tmux Quick Reference


Command Description
tmux Start a new tmux session
tmux ls List all running sessions
tmux attach -t 0 Connect to session named 0
tmux new -s database Create a new session named `database`
tmux rename-session -t 0 database Rename existing session from `0` to `database`

Command Keys

Keys Description
C-b % Split a pane into left and right
C-b " Split a pane into top and bottom
C-b <arrow key> Navigate to different pane
exit or Ctrl-d Close the pane
C-b c Create a new window
C-b p Go to the previous window
C-b n Go to the next window
C-b <number> Go to specific window number
C-b d Detach from the current session
C-b D Choose which session to detach
C-b z Toggle the pane fullscreen
C-b , Rename current window
C-b ? List available commands

*C-b means press and hold the Ctrl key and press b.


Shell Script Learning Resources

Debian Package Commands

Uninstalling Package

List installed packages

sudo apt list --installed

Remove package

sudo apt remove package_name
sudo apt remove package_name1 package_name2

Remove package with its configuration files

sudo apt purge package_name

Remove unused/orphaned packages

sudo apt autoremove