CommunityData:Tmux: Difference between revisions
From CommunityData
mNo edit summary |
No edit summary |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
* Starts a new tmux: '''tmux''' (at the command line) | * Starts a new tmux: '''tmux''' (at the command line) | ||
* Connect to an existing tmux: | * Connect to an existing tmux: <code>tmux attach</code> (at the command line) | ||
* Create a new window: '''Ctrl-b c''' (from ''within'' tmux) | * Create a new window: '''Ctrl-b c''' (from ''within'' tmux) | ||
* Switch to window ''N'': '''Ctrl-b N''' (from ''within'' tmux) | * Switch to window ''N'': '''Ctrl-b N''' (from ''within'' tmux) | ||
* PROTIP: Don't hold the buttons. | |||
* Disconnect from tmux: '''Ctrl-b d''' (from ''within'' tmux) | * Disconnect from tmux: '''Ctrl-b d''' (from ''within'' tmux) | ||
* To | * To shut down tmux close terminal without disconnecting. Reattach and repeat to make sure every tmux window is closed. | ||
* To exit an individual tmux attachment just close the window with '''Ctrl-d''' or by typing <code>exit</code> in the command line. | |||
<br> | |||
quick tips for using tmux with Hyak: | |||
* Connect to Hyak first | |||
* Start a new tmux | |||
* Connect to a node via <code>any_machine</code> | |||
* Start the tmux session | |||
* Disconnect | |||
<br> | <br> | ||
More elaborate [https://alvinalexander.com/downloads/linux/tmux-cheat-sheet.pdf cheat-sheets like this one (pdf)] are available elsewhere. | More elaborate [https://alvinalexander.com/downloads/linux/tmux-cheat-sheet.pdf cheat-sheets like this one (pdf)] are available elsewhere. |
Latest revision as of 21:17, 21 April 2025
tmux lets you switch between windows (listed in the green bar at the bottom) here are several useful commands:
- Starts a new tmux: tmux (at the command line)
- Connect to an existing tmux:
tmux attach
(at the command line) - Create a new window: Ctrl-b c (from within tmux)
- Switch to window N: Ctrl-b N (from within tmux)
- PROTIP: Don't hold the buttons.
- Disconnect from tmux: Ctrl-b d (from within tmux)
- To shut down tmux close terminal without disconnecting. Reattach and repeat to make sure every tmux window is closed.
- To exit an individual tmux attachment just close the window with Ctrl-d or by typing
exit
in the command line.
quick tips for using tmux with Hyak:
- Connect to Hyak first
- Start a new tmux
- Connect to a node via
any_machine
- Start the tmux session
- Disconnect
More elaborate cheat-sheets like this one (pdf) are available elsewhere.