Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1.  
  2. # *** tmux subcommands ***
  3.  
  4. # start a new tmux session
  5. tmux new-session -s [session-name]
  6.  
  7. # start a new tmux session with a named window
  8. tmux new-session -s [session-name] -n [window-name]
  9.  
  10. # list running sessions
  11. tmux ls
  12.  
  13. # attach to a running session
  14. tmux attach -t [session-name]
  15.  
  16. # kill a running session
  17. tmux kill-session -t [session-name]
  18.  
  19. # *** commands within tmux session ***
  20.  
  21. # send a command to tmux aka PREFIX (can be configured)
  22. Ctrl-b
  23.  
  24. # Note: hereafter the prefix shown is Ctrl-b
  25.  
  26. # bring up a list of all commands
  27. Ctrl-b ?
  28.  
  29. # detach (takes you back to the original terminal)
  30. Ctrl-b d
  31.  
  32. # windows
  33.  
  34. # create a window
  35. Ctrl-b c
  36.  
  37. # rename a window
  38. Ctrl-b ,
  39.  
  40. # go to next window (current window will have an asterisk *)
  41. Ctrl-b n
  42.  
  43. # go to previous window
  44. Ctrl-b p
  45.  
  46. # go to window at index N (where N starts at 0)
  47. Ctrl-b [N]
  48.  
  49. # find a window by name
  50. Ctrl-b f
  51.  
  52. # open a menu to select window
  53. Ctrl-b w
  54.  
  55. # close the window (terminate processes)
  56. Ctrl-b &
  57.  
  58. # panes
  59.  
  60. # vertical split aka pane
  61. Ctrl-b %
  62.  
  63. # horizontal split aka pane
  64. Ctrl-b "
  65.  
  66. # close a split aka pane
  67. Ctrl-b x
  68.  
  69. # cylce through splits aka panes
  70. Ctrl-b o
  71. Ctrl-b [up|down|right|left]
  72.  
  73. # cycle through some preconfigured pane layouts
  74. Ctrl-b [spacebar]
  75.  
  76. # kill pane (useful when process is not responding)
  77. Ctrl-b x
  78.  
  79. # shows numbers associated with panes
  80. Ctrl-b q
  81.  
  82. # toggle the current pane to full screen
  83. Ctrl-b z
  84.  
  85. # scroll buffer
  86.  
  87. # enter copy mode
  88. Ctrl-b [
  89.  
  90. # leave copy mode
  91. q
  92.  
  93. # page up
  94. Ctrl-b
  95.  
  96. # page down
  97. Ctrl-f
  98.  
  99. # clear selection buffer
  100. ESC
  101.  
  102. # *** commands at tmux status bar ***
  103.  
  104. # bring status bar into focus
  105. Ctrl-b :
  106.  
  107. # open a new named window
  108. :new-window -n [window-name]
  109.  
  110. # open a new named window running a command
  111. :new-window -n [window-name] "[cmd]"
  112.  
  113. # reload changes from tmux configuration file
  114. :source-file ~/.tmux.conf
  115.  
  116. # swap windows at src-index with dest-index
  117. :swap-window -s [src-index] -t [dest-index]
  118.  
  119. # rename session
  120. :rename-session -t [old-session-name] [new-session-name]
  121.  
  122. # move window
  123. # * with no arguments renumbers current window
  124. # * with -r argument renumbers all windows
  125. :move-window
  126. :movew
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement