-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTmuxScreen.txt
More file actions
127 lines (90 loc) · 3.59 KB
/
TmuxScreen.txt
File metadata and controls
127 lines (90 loc) · 3.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
https://gist.github.com/MohammedAlaa/2961058
tmux
tmux new -s <name>
tmux a # (or at, or attach)
tmux a -t myname
tmux a -d -t myname // the -d detaches all *other* sessions
tmux ls
tmux kill-session -t myname
Hit "Prefix" ctrl+b for the rest:
==========
Sessions:
s list session
$ name session
Windows (tabs):
c new window
w list windows
f find windows
, name window
& kill window
' brings up a prompt, to enter window number
Panes Management:
Panes (splits):
% horizontal split
" vertical split
o swap panes
q show pane numbers
x kill pane
+ break pane into window (e.g., to select text by mouse to copy)
- restore pane from window
space - toggle between layouts
q (show pane numbers, when the numbers show up, type the key to go to that pane)
{ (move the current pane left/top)
} (move current pane right/bottom)
RESIZING PANES
================
PREFIX : resize-pane (By default it resizes the current pane down)
PREFIX : resize-pane -U (Resizes the current pane upward)
PREFIX : resize-pane -L (Resizes the current pane left)
PREFIX : resize-pane -R (Resizes the current pane right)
PREFIX : resize-pane 20 (Resizes the current pane down by 20 cells)
PREFIX : resize-pane -U 20 (Resizes the current pane upward by 20 cells)
PREFIX : resize-pane -L 20 (Resizes the current pane left by 20 cells)
PREFIX : resize-pane -R 20 (Resizes the current pane right by 20 cells)
PREFIX : resize-pane -t 2 20 (Resizes the pane with the id of 2 down by 20
cells)
PREFIX : resize-pane -t -L 20 (Resizes the pane with the id of 2 left by
20 cells)
d detach
t big clock
? list shortcuts
: prompt
Copy/Paste in Tmux
------------------
Copying in Tmux:
1. Enter Copy Mode: Press `Ctrl` + `b` (default prefix) and `[` to enter copy mode.
2. Navigation in Copy Mode: Use arrow keys or vim-like navigation (h, j, k, l) to move the cursor.
3. Start Selection: Press Space to start selecting text.
4. End Selection: After selecting the desired text, press Enter to copy it to the Tmux buffer.
Pasting in Tmux:
1. Paste Buffer: Press Ctrl + b (default prefix) and ] to paste from the Tmux buffer.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ SCREEN COMMANDS @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Source: www.linuxjournal.com/article/6340?page=0,0
Source: http://news.softpedia.com/news/GNU-Screen-Tutorial-44274.shtml
Command character: Ctrl-a
Abbreviations: Ctrl = C, Shift = S
New screen -> C-a c [or C-a C-c]
List of screens -> C-a"
Switch screens -> C-a' [or C-a C-']
Previous screen -> C-a p [or C-a C-p]
Next screen -> C-a n [or C-a C-n]
Toggle -> C-a a [or C-a C-a] # toggles between last two screens
Set screen name -> C-a S-a
Kill a screen -> C-a S-k
Detach a screen -> C-a d [or C-a C-d]
Monitor output in current window -> C-A S-M
Monitor for silence -> C-a_ [30 sec by default]
List screens -> screen -ls
Attach to a screen -> screen -r sessionname
Start a new screen -> screen -R
Multi attach a screen -> screen -x sessionname
Scrollback -> To scroll through screens history, first enable the
copy mode by pressing C-A [
Now, use page-up, page-down, home and end keys to
scroll through screens history.
Copy mode -> C-A [ or copy. Pressing Enter will starting marking
text. Enter again to copy the text to clipboard.
Now, paste using C-A ]
Paste -> C-A ]
Copy/Paste did not work for me
List of commands -> C-A ?