Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux_wiki:tmux [2015/10/02 14:31] billdozor [Copy/Paste with Keyboard] |
linux_wiki:tmux [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 6: | Line 6: | ||
**Checklist** | **Checklist** | ||
- | * Distros: All | + | * Distro(s): Any |
* Package: tmux | * Package: tmux | ||
---- | ---- | ||
- | ===== Install ===== | + | ====== Install |
Install tmux: | Install tmux: | ||
Line 22: | Line 22: | ||
---- | ---- | ||
- | ===== Tmux Operation ===== | + | ====== Tmux Operation |
1) Open a terminal | 1) Open a terminal | ||
Line 33: | Line 33: | ||
---- | ---- | ||
- | ==== Session Control ==== | + | ===== Session Control |
Start a named tmux session | Start a named tmux session | ||
Line 62: | Line 62: | ||
---- | ---- | ||
- | ==== Windows ==== | + | ===== Windows |
Like screen, tmux has windows. | Like screen, tmux has windows. | ||
Line 89: | Line 89: | ||
---- | ---- | ||
- | ==== Panes ==== | + | ===== Panes ===== |
An advantage that tmux has over screen, is the ability to create panes. | An advantage that tmux has over screen, is the ability to create panes. | ||
Line 129: | Line 129: | ||
Ctrl+b ESC+1 | Ctrl+b ESC+1 | ||
</ | </ | ||
+ | |||
---- | ---- | ||
- | ==== Copy/Paste with Keyboard ==== | + | ===== Copy/Paste with Keyboard |
Enter copy mode | Enter copy mode | ||
Line 149: | Line 150: | ||
</ | </ | ||
- | ==== Other Commands ==== | + | ===== Other Commands |
Help | Help | ||
Line 163: | Line 164: | ||
---- | ---- | ||
- | ===== Tmux Config File ===== | + | ====== Tmux Config File ====== |
You can customize tmux with a config file in your home directory. | You can customize tmux with a config file in your home directory. | ||
Line 185: | Line 186: | ||
# Allow xterm titles in terminal window, terminal scrolling with scrollbar, and setting overrides of C-Up, C-Down, C-Left, C-Right | # Allow xterm titles in terminal window, terminal scrolling with scrollbar, and setting overrides of C-Up, C-Down, C-Left, C-Right | ||
set -g terminal-overrides " | set -g terminal-overrides " | ||
+ | |||
+ | # Set default shell | ||
+ | set-option -g default-shell /bin/zsh | ||
+ | |||
+ | # Allow mouse click to select a pane to be active | ||
+ | set -g mouse-select-pane on | ||
+ | |||
+ | # Mouse wheel scrolling for individual panes (newer versions of tmux; ie Fedora 27) | ||
+ | set -g mouse on | ||
+ | bind -n WheelUpPane if-shell -F -t = "# | ||
+ | |||
+ | # Mouse wheel scrolling for individual panes (older versions of tmux; ie CentOS 7) | ||
+ | set -g mode-mouse on | ||
</ | </ | ||
+ | * **Notes:** | ||
+ | * When enabling mouse options in tmux, the ability to highlight text as normal for a copy/paste operation goes away. Using shift temporarily over rides tmux capture of the mouse. | ||
+ | * To copy/paste (if using mouse options) | ||
+ | * **hold shift**, select text, copy | ||
+ | * **hold shift**, right click, paste (or middle click) | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== Tmux Aliases ====== | ||
+ | |||
+ | Some useful tmux aliases from ~/.bashrc | ||
+ | <code bash> | ||
+ | # Tmux Aliases | ||
+ | alias tls=' | ||
+ | alias tat=' | ||
+ | alias tns=' | ||
+ | </ | ||
+ | |||
+ | ---- |