Skip to content

Instantly share code, notes, and snippets.

@WebSofter
Last active June 14, 2021 04:55
Show Gist options
  • Save WebSofter/a7ab618767a105e1f10472a98ecf033d to your computer and use it in GitHub Desktop.
Save WebSofter/a7ab618767a105e1f10472a98ecf033d to your computer and use it in GitHub Desktop.
Tmux commands
$ sudo apt install tmux #Install tmux on ubuntu/debian
#Sessions an splitings
$ Ctrl+b s #List sessions
$ Ctrl+b $ #Name session
$ tmux new-session -s [session_name | id] #Create the new session
$ tmux attach #Connect to last or to single session
$ tmux attach -t test #Connect to specify session
$ ctrl+b d #1 Disconnect from current session (NOT KILL)
$ tmux detach #2 Disconnect from current session (NOT KILL)
$ tmux kill-session -t test #Kill specify session
$ tmux kill-server #Kill all sessions
#Panes
$ Ctrl+b q #Show pane numbers
$ Ctrl+b % #Split current pane horizontally into two panes
$ Ctrl+b \" #Split current pane vertically into two panes
$ Ctrl+b o #Go to the next pane
$ Ctrl+b ; #Toggle between the current and previous pane
$ Ctrl+b x #Kill the current pane
$ Ctrl+b ⍽ #Space - toggle between layouts
#Windows and navigations and spliting
$ Ctrl+b w #Select window from list
$ Ctrl+b n #Change to next window
$ Ctrl+b p #Change to previous window
$ Ctrl+b 3 #Change to window by num
$ Ctrl+b , #Rename the current window
$ Ctrl+b f #Find window
$ Ctrl+b & #Kill window
$ Ctrl+b . #Move window - prompted for a new number
$ Ctrl+b [left | right | top | bottom] #Navigation
$ Ctrl+b c #1 Create new window
$ tmux new-window -c #2 Create new window
$ tmux kill-window -t 3 #Kill window by num
$ Ctrl+b % #1 Vertical split current window
$ tmux split-window -v #2 Vertical split current window
$ Ctrl+b \" #1 Horizontal split current window
$ tmux split-window -h #2 Horizontal split current window
$ Ctrl+b x #1 Exit from current window
$ exit #2 Exit from current window
#Conf
$ nano ~/.tmux.conf #Edit tmux conf file
#Additional
$ ctrl+b t #Big clock
$ ctrl+b ? #List shortcuts
$ ctrl+b : #Prompt
$ tmux ls #List of active sessions
$ tmux list-commands #Show all supported commands
$ man tmux #Extended information about tmux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment