# Linux Fundamentals Part 2

### Task 1 - Introduction

*No answer required, join the room to get started !*

### Task 2 - Accessing Your Linux Machine Using SSH (Deploy)

1. Click on 'Start Machine' to deploy the machine&#x20;
2. Scroll upwards and click on&#x20;
3. Connect to ssh with the following command&#x20;

```
// ssh tryhackme@<MACHINE_IP_ADDRESS>
```

Note that we need to use the IP address of the machine we just deployed , in our case it is : 10.10.2.59

![](https://1348136611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jFaYqSieDDY6epzeZcG%2Fuploads%2FALSK8G5h3KHKCoCbdvhM%2Fimage.png?alt=media\&token=7e65957a-8fa5-4ac4-8e5e-3455dae69363)

When prompted for a password type - tryhackme. After the connection is established we will see the user name change to *tryhackme\@linux2*

![](https://1348136611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jFaYqSieDDY6epzeZcG%2Fuploads%2FPF3d7TXTJb1Sm4bjvdZf%2Fimage.png?alt=media\&token=b93575cf-679b-4309-abeb-573ba6eecf4a)

***Answer :** No answer required, give submit once you're connected through ssh*

### Task 3 - Introduction to Flags and Switches

**Q. Explore the manual page of the ls command**

*No answer*&#x20;

***Q.*****&#x20;What directional arrow key would we use to navigate down the manual page?**

*down*

**Q. What flag would we use to display the output in a "human-readable" way?**

*-h*&#x20;

### Task 4 - Filesystem Interaction Continued

**Q. How would you create the file named "newnote"?**

*touch newnote*

![](https://1348136611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jFaYqSieDDY6epzeZcG%2Fuploads%2F79VE25cjV9JHUorzfsTN%2Fimage.png?alt=media\&token=04ad724f-92ae-43c2-a546-5a1599dff115)

**Q. On the deployable machine, what is the file type of "unknown1" in "tryhackme's" home directory?**

*ASCII text*

![](https://1348136611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jFaYqSieDDY6epzeZcG%2Fuploads%2FxQprhg26epxUDJB998cy%2Fimage.png?alt=media\&token=79981a9a-c4ed-4077-867e-2a54b294e580)

**Q. How would we move the file "myfile" to the directory "myfolder"**

*mv myfile myfolder*

***Q.*****&#x20;What are the contents of this file?**

*THM{FILESYSTEM}*

### ![](https://1348136611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jFaYqSieDDY6epzeZcG%2Fuploads%2FWDqIr06YtVR8QnrZ532Q%2Fimage.png?alt=media\&token=bde45ca2-7595-4b42-ad5e-ff6a9e0485a5)

### Task 5 - Permissions 101

**Q. On the deployable machine, who is the owner of "important"?**

*user2*

![](https://1348136611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jFaYqSieDDY6epzeZcG%2Fuploads%2FanA0I4JDhadZ8iu1x6KV%2Fimage.png?alt=media\&token=91b95f42-c513-4e96-8e0f-ae180776c16f)

**Q. What would the command be to switch to the user "user2"?**

*su user2*

**Q. Now switch to this user "user2" using the password "user2"**

*No answer*&#x20;

***Q.*****&#x20;Output the contents of "important", what is the flag?**

*THM{SU\_USER2}*

![](https://1348136611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jFaYqSieDDY6epzeZcG%2Fuploads%2F4lL10RMqH4GotqZg35aT%2Fimage.png?alt=media\&token=5dab84e6-4609-495a-a053-eba441cd90c4)

### Task 6 - Common Directories

**Q. What is the directory path that would we expect logs to be stored in?**

*/var/log*

***Q.*****&#x20;What root directory is similar to how RAM on a computer works?**

*/tmp*

**Q. Name the home directory of the root user**

*/root*

**Q. Now apply your learning and navigate through these directories on the deployed Linux machine.**

*No answer*&#x20;

### Task 7 - Conclusion and Summaries

**Q. Proceed to the next task to continue your learning**

### Task 8  - Linux Fundamentals Part 3

**Q. Terminate the machine from task 2!**\
**Q. Join Linux Fundamentals Part 3!**

![](https://1348136611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jFaYqSieDDY6epzeZcG%2Fuploads%2Fmbkcba7hP5H7rWyCDetE%2Fimage.png?alt=media\&token=515aaf49-13a8-45ab-b751-b1a5185862ae)
