tmux - Write-up - TryHackMe



  • Name: tmux
  • Profile:
  • Difficulty: Easy
  • Description: Part of the Red Primer series, learn to use tmux!




Install tools used in this WU on BlackArch Linux:

pikaur -S	tmux

Disclaimer: The answer essentially requires to search for options in the man page so it doesn't need a detailed write-up.

[Task 1] Screens wishes it was this cool.#


Once tmux is installed, let's launch a new session. What command do we use to launch a new session without a custom name?



All tmux commands start with a keyboard button combination. What is the first key in this combination?

Answer: control


How about the second key? Note, these keys must be pressed at the same time and released before pressing the next target key in the combination.

Answer: b


Lets go ahead and detach from our newly created tmux session. What key do we need to add to the combo in order to detach?

Answer: d


Well shoot, we've detached from our session. How do we list all of our sessions?

Answer: tmux ls

Also works with:

$ tmux list-sessions
0: 2 windows (created Wed Sep 9 14:50:21 2020) (attached)


What did our session name default to when we created one without a set name?

Answer: 0


Now that we've found the name of our session, how do we attach to it?

Answer: tmux a -t 0

Also works with:

$ tmux attach-session -t 0


Let's go ahead and make a new window in this session. What key do we add to the combo in order to do this?

Answer: c


Whew! Plenty of output to work with now! If you work with a relatively small terminal like me, this output might not all fit on screen at once. To fix that, let's enter 'copy mode'. What key do we add to the combo to enter copy mode?

Answer: [


Copy mode is very similar to 'less' and allows up to scroll up and down using the arrow keys. What if we want to go up to the very top?

Answer: g


How about the bottom?

Answer: G


What key do we press to exit 'copy mode'?

Answer: q


This window we're working in is nice and all but I think we need an upgrade. What key do we add to the combo to split the window vertically?

Answer: %


How about horizontally?

Answer: "


Say one of these newly minted panes becomes unresponsive or we're just done working in it, what key do we add to the combo to 'kill' the pane?

Answer: x


Now that's we've finished out work, what can we type to close the session?

Answer: exit


Last but now least, how do we spawn a named tmux session named 'neat'?

Answer: tmux new -s neat