Knowledge Hub
REmux The Tmux
TryHackMe60 answered prompts
REmux The Tmux TryHackMe walkthrough with 60 answered prompts and lab methodology notes.
Prompts and answers
-
Do the ctrl and b keys need to be held down the whole time with every commands to work? yea/nay
nay
-
How to start tmux with the session with the name "thm"?
tmux new -s thm
-
How to change the current tmux session name?
ctrl b shift $
-
How to quit a tmux session without closing the session? To attach back later.
ctrl b d
-
How to list all tmux sessions?
tmux ls
-
How to reattach to a detached tmux session with the session name of "thm"
tmux a -t thm
-
How to create a new tmux session from your current tmux session with the name kali?
tmux new -s kali -d
-
How to switch between two or more tmux sessions without detaching from the current tmux session?
ctrl b s
-
How do you force kill the tmux session named "thm" if it's not responsive from a new terminal window or tmux session?
tmux kill-session -t thm
-
Within a nested tmux session. A second tmux session within the first one. How to change the session name of the second/internal tmux session?
ctrl b ctrl b shift $
-
How to get into a tmux prompt to run/type tmux commands?
ctrl b shift :
-
Are there more than one way to exit a tmux prompt? yea/nay
yea
-
Is tmux case sensitive. Will hitting the caps lock break tmux? yea/nay
yea
-
Within tmux prompt or command mode how would you change the tmux directory? Where a new window or pane will start from the changed directory of /opt.
a -c /opt
-
How to kill all tmux sessions accept the one currently in use? With the name "notes".
tmux kill-session -t notes -a
-
How to create a new pane split horizontally?
ctrl b shift "
-
How to close a tmux pane like closing a ssh session?
exit
-
How to create a new pane split vertically?
ctrl b shift %
-
How to cycle between tmux pre built layout options? Starting with the number 1.
ctrl b esc 1
-
How to cycle/toggle between tmux layouts, one at a time?
ctrl b spacebar
-
How to force quit a frozen, crashed or borked pane?
ctrl b x y
-
How to move between the two must used tmux panes for the current tmux window?
ctrl b ;
-
Can you use the arrow to move to the desired pane? yea/nay
yea
-
How to move the currently selected pane clockwise?
ctrl b shift {
-
How to move the currently selected pane counter-clockwise
ctrl b shift }
-
Before using swap-pane. How to check for which pane has what number?
ctrl b q
-
How to swap two panes and move with the swapped pane? Within tmux prompt mode. 1 -> 3 location
swap-pane -s 3 -t 1
-
How to swap two panes without changing the currently selected pane location? Within tmux prompt mode. 1 -> 4 pane number
swap-pane -t 4 -s 1
-
How to create a new empty tmux window?
ctrl b c
-
How to change the currently select window's name?
ctrl b ,
-
How to move the currently selected pane to it's own tmux window?
ctrl b shift !
-
How to fuse two panes together with the "source" window of "bash"? After entering a tmux prompt?
join-pane -s bash
-
How to fuse two panes together with the "destination" window of "sudo"? After entering a tmux prompt?
join-pane -t sudo
-
What option can added with question 4 and 5 to fuse together vertically?
-v
-
What option can added with question 4 and 5 to fuse together horizontally?
-h
-
With join-pane can you use the window number instead of the window's name? yea/nay
yea
-
How to kill or completely close a window. Including all the panes open on that window. If it's unresponsive?
ctrl b shift &
-
How to view and cycle between all the tmux windows for the current tmux session without detaching from the current session?
ctrl b w
-
How to move back to the previous tmux window?
ctrl b p
-
How to move up to the next tmux window?
ctrl b n
-
How to start copy mode?
ctrl b [
-
While in copy mode. How to search/grep up the wall of terminal text?
ctrl r
-
While in copy mode. How to search/grep down the wall of terminal text?
ctrl s
-
How to exit search up or search down within copy mode?
esc
-
What single key can also be used to to exit out of copy mode.
q
-
After starting copy mode. How do you enable text highlighting to select for text copying?
ctrl spacebar
-
After selecting the text you want to copy. How do copy it?
alt w
-
When in a terminal text editor. How to paste from the tmux clipboard?
ctrl b ]
-
How to double check what is currently copied to the tmux clipboard
ctrl b shift #
-
Does tmux have a default tmux.conf config file? yea/nay
nay
-
Where can you find examples for custom tmux.conf config files?
/usr/share/doc/tmux
-
Can you use Hex color codes in place of the color name? yea/nay
yea
-
What directory must the .tmux.conf be put in to work with the next tmux session
home
-
How would you update tmux changes without quitting the tmux session from a tmux prompt?
source-file ~/.tmux.conf
-
How to completely reset tmux to its default and kill all sessions? If the .tmux.conf is borked.
tmux kill-server
-
How would you select addition hotkeys. Without overwriting the default hotkey?
bind
-
How would you change the prefix to Ctrl a?
set -g prefix C-a
-
Can you display shell command output. From a script or one line command? yea/nay
yea
-
How would you load a plugin into a tmux config file?
set -g @plugin
-
How can you run the desired plugin after loading it?
run-shell