Tryhackme Free Walk-through Room: REmux The Tmux

Dan Schwarzentraub
8 min readNov 10, 2024

--

Task 1: Tmux practice machine

Username: tux

Password: tmuxwithremux

Task 2: Starting tmux “Sessions” and default tmux “prefix”

Question: Do the ctrl and b keys need to be held down the whole time with every commands to work? yea/nay

Answer: nay

Question: How to start tmux with the session with the name “thm”?

Answer: tmux new -s thm

Question: How to change the current tmux session name?

Answer: ctrl b shift $

Question: How to quit a tmux session without closing the session? To attach back later.

Answer: ctrl b s

Question: How to list all tmux sessions?

Answer: tmux ls

Question: How to reattach to a detached tmux session with the session name of “thm”

Answer: tmux a -t thm

Question: How to create a new tmux session from your current tmux session with the name kali?

Answer: tmux new -s kali -d

Question: How to switch between two or more tmux sessions without detaching from the current tmux session?

Answer: ctrl b s

Question: How do you force kill the tmux session named “thm” if it’s not responsive from a new terminal window or tmux session?

Answer: tmux kill-session -t thm

Question: 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?

Answer: ctrl b ctrl b shift $

Question: How to get into a tmux prompt to run/type tmux commands?

Answer: ctrl b shift :

Question: Are there more than one way to exit a tmux prompt? yea/nay

Answer: yea

Question: Is tmux case sensitive. Will hitting the caps lock break tmux? yea/nay

Answer: yea

Question: 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.

Answer: a -c /opt

Question: How to kill all tmux sessions accept the one currently in use? With the name “notes”.

Answer: tmux kill-session -t notes -a

Task 3: Manage tmux “Panes”

Question: How to create a new pane split horizontally?

Answer: ctrl b shift “

Question: How to close a tmux pane like closing a ssh session?

Answer: exit

Question: How to create a new pane split vertically?

Answer: ctrl b shift %

Question: How to cycle between tmux pre built layout options? Starting with the number 1.

Answer: ctrl b esc 1

Question: How to cycle/toggle between tmux layouts, one at a time?

Answer: ctrl b spacebar

Question: How to force quit a frozen, crashed or borked pane?

Answer: ctrl b x y

Question: How to move between the two must used tmux panes for the current tmux window?

Answer: ctrl b ;

Question: Can you use the arrow to move to the desired pane? yea/nay

Answer: yea

Question: How to move the currently selected pane clockwise?

Answer: ctrl b shift {

Question: How to move the currently selected pane counter-clockwise

Answer: ctrl b shift }

Question: Before using swap-pane. How to check for which pane has what number?

Answer: ctrl b q

Question: How to swap two panes and move with the swapped pane? Within tmux prompt mode. 1 -> 3 location

Answer: swap-pane -s 3 -t

Question: How to swap two panes without changing the currently selected pane location? Within tmux prompt mode. 1 -> 4 pane number

Answer: swap-pane -s 4 -t

Task 4: Manage tmux “Windows”

Question: How to create a new empty tmux window?

Answer: ctrl b c

Question: How to change the currently select window’s name?

Answer: ctrl b ,

Question: How to move the currently selected pane to it’s own tmux window?

Answer: ctrl b shift !

Question: How to fuse two panes together with the “source” window of “bash”? After entering a tmux prompt?

Answer: join-pane -s bash

Question: How to fuse two panes together with the “destination” window of “sudo”? After entering a tmux prompt?

Answer: join-pane -t sudo

Question: What option can added with question 4 and 5 to fuse together vertically?

Answer: -v

Question: What option can added with question 4 and 5 to fuse together horizontally?

Answer: -h

Question: With join-pane can you use the window number instead of the window’s name? yea/nay

Answer: yea

Question: How to kill or completely close a window. Including all the panes open on that window. If it’s unresponsive?

Answer: ctrl b shift &

Question: How to view and cycle between all the tmux windows for the current tmux session without detaching from the current session?

Answer: ctrl b w

Question: How to move back to the previous tmux window?

Answer: ctrl b n

Question: How to move up to the next tmux window?

Answer: ctrl b p

Task 5: Tmux “copy” mode

Question: How to start copy mode?

Answer: ctrl b [

Question: While in copy mode. How to search/grep up the wall of terminal text?

Answer: ctrl r

Question: While in copy mode. How to search/grep down the wall of terminal text?

Answer: ctrl s

Question: How to exit search up or search down within copy mode?

Answer: esc

Question: What single key can also be used to to exit out of copy mode.

Answer: q

Question: After starting copy mode. How do you enable text highlighting to select for text copying?

Answer: ctrl spacebar

Question: After selecting the text you want to copy. How do copy it?

Answer: alt w

Question: When in a terminal text editor. How to paste from the tmux clipboard?

Answer: ctrl b ]

Question: How to double check what is currently copied to the tmux clipboard

Answer: ctrl b shift #

Task 6: Oh My Tmux and beyond

Question: Does tmux have a default tmux.conf config file? yea/nay

Answer: nay

Question: Where can you find examples for custom tmux.conf config files?

Answer: /usr/share/doc/tmux

Question: Can you use Hex color codes in place of the color name? yea/nay

Answer: yea

Question: What directory must the .tmux.conf be put in to work with the next tmux session

Answer: home

Question: How would you update tmux changes without quitting the tmux session from a tmux prompt?

Answer: source-file~/.tmux.conf

Question: How to completely reset tmux to its default and kill all sessions? If the .tmux.conf is borked.

Answer: :tmux kill-server

Question: How would you select addition hotkeys. Without overwriting the default hotkey?

Answer: bind

Question: How would you change the prefix to Ctrl a?

Answer: set -g prefix C-a

Question: Can you display shell command output. From a script or one line command? yea/nay

Answer: yea

Question: How would you load a plugin into a tmux config file?

Answer: set -g @ plugin

Question: How can you run the desired plugin after loading it?

Answer: run-shell

Task 7: Oreo’s open-source .tmux.conf file

--

--

No responses yet