【TryHackMe】tmux：Walkthrough

# 概要

TryHackMe「tmux」ルームのWalkthroughです。

https://tryhackme.com/r/room/rptmux

# Task1

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

**Hint**.*Whats the name of the tool we just installed?*

**A**.**tmux**

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

**Hint**.*Take a look at the keys in light blue on the cheat sheet. This key is repeated with almost every command*

**A**.**Control**

## **Q3**.*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.*

**Hint**.*Its a letter key, take a look at the above keys in light blue on the cheat sheet.*

**A**.**B**

## **Q4**.*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?*

**Hint**.*Purple section of the cheat sheet.*

**A**.**D**

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

**Hint**.*This one isn't on the cheat sheet but it's the same as listing files on linux.*

**A**.**tmux ls**

## **Q6**.*What did our session name default to when we created one without a set name?*

**Hint**.*This should be a number, it's where arrays start in programming if you're using a good programming language ;)*

**A**.**0**

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

**Hint**.*I'll be focusing on the shorthand commands here. Note, this is in the bottom left corner of the purple section on the cheat sheet.*

**A**.**tmux a -t 0**

## **Q8**.*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?*

**Hint**.*We're now moving over the right green section of the cheat sheet.*

**A**.**c**

## **Q10**.*Run the following scan against the VM: nmap -sV -vv -sC TARGET_IP*

`nmap`でスキャンを実行します。

```
$ nmap -sV -vv -sC 10.10.253.39
```

## **Q11**.*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?*

**Hint**.*Blue section of the cheat sheet!*

**A**.**[**

## **Q12**.*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?*

**Hint**.*Blue section of the cheat sheet!*

**A**.**g**

## **Q13**.*How about the bottom?*

**Hint**.*Blue section of the cheat sheet!*

**A**.**G**

## **Q14**.*What key do we press to exit 'copy mode'?*

**Hint**.*Same as exiting 'less'*

**A**.**q**

## **Q15**.*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?*

**Hint**.*Red section of the cheat sheet! You'll likely need to hit 'shift' as well for this one!*

**A**.**%**

## **Q16**.*How about horizontally?*

**Hint**.*Red section of the cheat sheet! You'll likely need to hit 'shift' as well for this one!*

**A**.**"**

## **Q20**.*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?*

**Hint**.*Red section of the cheat sheet!*

**A**.**X**

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

**Hint**.*These signs will tell you how to leave a building ;)*

**A**.**exit**

## **Q22**.*Last but not least, how do we spawn a named tmux session named 'neat'?*

**Hint**.*Purple section of the cheat sheet, nearly forgot to add this question!*

**A**.**tmux new -s neat**