This article serves as a guide for the use of Tmux, an open source terminal multiplexer.
I find it to be fun for security work, ctfs, and generally useful.
tmux
utilities
#install tmux
sudo apt install tmux
# start tmux
tmux
# start tmux with named session
tmux new -s SessionName
# split window horizontally
Ctrl+B %
# Split window vertically
Ctrl+B "
# shift between panes
Ctrl+B arrow key of the direction you want to move in
# create new window
Ctrl+B C
# shift between windows
Ctrl+B 0 (or number of window you want to switch to)
# rename window
Ctrl+B , git (if renaming to git)
# exit from a window
exit
# detach session
Ctrl+B d
# list sessions
tmux ls
# attach session
tmux attach -t git (if you are attaching the git session)
# rename session
tmux rename-session -t 0 git (rename session 0 to git)
# kill session
tmux kill-session -t SessionName
# print out session output to file
tmux capture-pane -pS - > ./fileName
# for example:
tmux capture-pane -pS - > ./nibbles-history would capture all the output and store it in a file named nibbles-history in the current directory
# scrolling in tmux
Ctrl+B [
# stop scrolling in tmux
q
# copy paste tmux content
ctrl+B [ (to enter copy mode)
use arrow keys to navigate to position you want to start copying
ctrl+ space (to start copying)
use arrow keys to navigate to end position of what you want to copy
ctrl+B ] to paste into a different Tmux pane /window.
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up