Friday, December 2, 2022

GoTTY/tmux Quick Reference

 

TDLR

GoTTY is a command-line tool that turns any CLI tool into a web application.

tmux (terminal multiplexer) is a command-line tool to create multiple terminals in a single screen.

Start Session

  • gotty --permit-write --port 9090

    • Default localhost/127.0.0.1

    • --permit-write, -w Allows the TTY session to be written to

    • --port value, -p value The port to listen on

  • tmux new [-s session-name]

    • creates a new tmux session named 'session-name'

tmux Panes

Split the screen (panes) vertically

Press and release Ctrl + b then press Shift + % to split the pane vertically

Split the screen (panes) horizontally

Press and release Ctrl + b then press Shift + " to split the pane horizontally

Switch between panes

Press and release Ctrl + b then press the arrow keys <- | -> to switch between panes

Or

Press and release Ctrl + b then press the letter o key to switch between panes

Scroll mode

Press and release Ctrl + b then press Shift + [ to enter into scroll mode

q to quit out of scroll mode

Shortcuts

Shortcuts

  • % create a horizontal pane

  • " create a vertical pane

  • h move to the left pane

  • j move to the pane below

  • l move to the right pane

  • k move to the pane above

  • q show pane numbers

  • o toggle between panes

  • } swap with next pane

  • { swap with the previous pane

  • ! break the pane out of the window

  • x kill the current pane

List Sessions

tmux list-sessions

Kill Sessions

tmux kill-sessions -t <session name>

Reference

No comments:

Post a Comment