Linux Fundamentals — Part 2 [TryHackMe]

gr33nm0nk2802
4 min readJun 11, 2021

Difficulty: Easy

Link: https://tryhackme.com/room/linuxfundamentalspart2

Hello everyone, in this continuation of the Linux Fundamentals series, we are going to look at how to use ssh, flags, file systems and file permissions. So, without any further adieu lets get started.

Task #1 : Introduction

Task #2 : Accessing the Linux machine using SSH

In this section we will learn how to ssh into the Linux machine instead of using the browser based VM. Though we can still use the attack machine from the browser, it is certainly better for us to use the machine via. ssh.

  1. Deploy the VM and note its IP address.

2. SSH into the VM using username and password both tryhackme

ssh tryhackme@10.10.221.8

Task #3 : Introduction to Flags and switches

In this section we have to use some flags with the ls command. We can have a look at the man page to know specific details of a flag or use the help flag

command -- help

man [command]

Q. What directional arrow key would we use to navigate down the manual page?

Answer: down

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

Answer: -h

(Refer to the man page for additional info)

Task #4 : Filesystem Interactions Continued

In this section we discuss some general commands to create, move and delete files and folders

Q. How would you create the file named “newnote”?

touch newnote

Q. On the deployable machine, what is the file type of “unknown1” in “tryhackme’s” home directory?

ASCII text

Q. How would we move the file “myfile” to the directory “myfolder”

mv myfile myfolder

Q. What are the contents of this file?

Task #5: Permissions 101

In this section we take a look at the file permissions. Long listing current directory gives us the contents of the current directory with the file permissions.

ls -l

Also we can denote read with 4, write with 2 and execute with 1. Hence, the sum of the rwx gives the permission for a particular user.

Also we can use the su command to switch user from one user to another

su -l [username]

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

Q. What would the command be to switch to the user “user2”?

su user2

Q. Output the contents of "important", what is the flag?

Task #6: Common Directories

You can learn more about the filesystem from here.

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

/var/log

Q. What root directory is similar to how RAM on a computer works?

/tmp

Q. Name the home directory of the root user

/root

Task #8: Conclusion

Now once you have some basic understanding of these concepts move to Linux Fundamentals Part 3

Peace Out

--

--

gr33nm0nk2802

A cybersecurity enthusiast interested in Reverse Engineering. Love to Code