TMUX Starter : How to start using TMUX [Shortcut Keys]

Coding Sprint
2 min readJan 20, 2024

--

TMUX : This allows you to create multiple terminal inside one terminal and it allows you to detach from any sub terminal while leaving it running or say working and if open any time when required you will get previously left terminal.

For example : you created a session in TMUX where you are pinging google.com and then you detach to other session where you started installing python . So when you will open first session it will be their working form the start of the creation i.e pinging google.com.

COMMANDS TO USE : [use linux]

Installation

sudo apt install tmux

Create new session [ or subterminal]

  • Default [command]:
tmux
  • Session with name [command]:
tmux new -s name_of_session

See all session [command]:

tmux ls

Detach Session [shortcut key]:

Press ctr+b then leave
Press d

Attach Session [command]

tmux a -t session_index

Or

tmux a -t session_name

Kill Session [command] :

tmux kill-session -t session_name
or
tmux kill-session -t session_index

Three components of tmux :

  • session
  • Inside session -> window
  • Inside window -> panes

Create new windows inside session [shortcut key]:

Press ctr+b then leave
Press c

Switch between windows [shortcut key]:

Press ctr+b then leave
Press n

Create panes inside window [shortcut key]:

Press ctr+b then leave
Press shift+5

Or

Press ctr+b then leave
Press shift+"

Switch between panes [shortcut key]:

Press ctr+b then leave
Press any arrow key

Get everything in menu form [shortcut key]:

Press ctr+b then leave
Press w
  • After that select and press enter to switch
  • To delete anything select any thing and press
Press ctr+b then leave
Press x
Press y

--

--

Coding Sprint

Learn to improve coding skills by learning Website Building , Android App , AI , Desigining , Blockchain , Crypto , SEO , Machine Learning , Python Javascript