Linux Fundamental Part 2| TryHackMe

br4ind3ad
3 min readJun 24, 2021

--

Task 1 : Introduction

This room helps in advancing the knowledge of filesystem & various commands.

no Answer needed

Task 2: Accessing Your Linux Machine Using SSH (Deploy)

To ssh enter the command “ssh username@machineIP”;

Password needs to be entered to successfully login.

command1: ssh tryhackme@10.10.232.191

enter password: tryhackme

Task 3: Introduction to Flags and Switches

a) Explore the manual page of the ls command

no answer needed

b) What directional arrow key would we use to navigate down the manual page?

down

c) What flag would we use to display the output in a “human-readable” way?

— h

Task 4: Filesystem Interaction Continued

a)How would you create the file named “newnote”?

touch newnote

{touch command is used to create a file}

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

ASCII text

{file file_name is used to find the file type; use command ” file unknown1”}

c) How would we move the file “myfile” to the directory “myfolder"

mv myfile myfolder

{command mv file_to_be_moved destination}

d) What are the contents of this file?

THM{FILESYSTEM}

{use the cat command to see the content}

Task 5: Permissions 101

“ providing the -lswitch to su, we start a shell that is much more similar to the actual user logging into the system - we inherit a lot more properties of the new user, i.e., environment variables and the likes.”

a) On the deployable machine, who is the owner of “important”?

user2

b) What would the command be to switch to the user “user2”?

su user2

c) Now switch to this user “user2” using the password “user2”

No answer needed

d) Output the contents of “important”, what is the flag?

THM{SU_USER2}

Task 6: Common Directories

/etc — store system files that are used by your operating system{“passwd”, “shadow”, etc}.

/var — stores data that is frequently accessed or written by services or applications running on the system like logs.

/root — the folder is the home for the “root” system user.

/tmp — used to store data that is only needed to be accessed once or twice. when computer is restarted, the data is cleared.

a) Read me!

no answer needed

b) What is the directory path that would we expect logs to be stored in?

/var/log

c) What root directory is similar to how RAM on a computer works?

/tmp

{as ram is random access memory, used to store working data and machine code and data is cleared at shutdown}

d) Name the home directory of the root user

/root

e) Now apply your learning and navigate through these directories on the deployed Linux machine.

no answer needed

Task 7: Conclusions and Summaries

no answer needed

Task 8: Linux Fundamentals Part 3

join the room Linux Fundamentals Part 3 using link Linux Fundamentals Part 3!

and terminate the machine.

--

--

No responses yet