Linux Fundamentals Part 2

Continue your learning Linux journey with part two. You will be learning how to log in to a Linux machine using SSH, how to advance your commands, file system interaction.

@official link of the room.

TASK 1 - INTRODUCTION

Q1) Let's proceed! [ No Answer Needed ]

TASK 2 - Accessing Your Linux Machine Using SSH (Deploy)

Remember this :-

For this room, we will be logging in as "tryhackme", whose password is "tryhackme" without the quotation ("") marks. Let's use the IP address of the machine displayed in the card at the top of the room as the IP address and this user, to construct a command to log in to the remote machine using SSH. The command to do so is ssh and then the username of the account, @ the IP address of the machine.

Connect to the machine using ssh :- ssh tryhackme@10.10.xx.xx

Q1) I've logged into the Linux Fundamentals Part 2 machine using SSH! [ No Answer Needed ]

TASK 3 - Introduction to FLAGS and SWITCHES

Q1) Explore the manual page of the ls command [ No Answer Needed ]

just type "man ls" and hit enter & u will see a menu like above

Q2) What directional arrow key would we use to navigate down the manual page? [ d*** ]

Q3) What flag would we use to display the output in a "human-readable" way? [ -* ]

just read the menu open by "man ls" carefully

TASK 4 - FileSystem Interaction Continued

Remember this :-

Command

Full Name

Purpose

touch

touch

Create file

mkdir

make directory

Create a folder

cp

copy

Copy a file or folder

mv

move

Move a file or folder

rm

remove

Remove a file or folder

file

file

Determine the type of a file

Q1) How would you create the file named "newnote"? [ t**** ******* ]

Q2) On the deployable machine, what is the file type of "unknown1" in "tryhackme's" home directory? [ A**** **** ]

Q3) How would we move the file "myfile" to the directory "myfolder" [ m* ****** ******** ]

Q4) What are the contents of this file? [ T**{**********} ]

Q5) Continue to apply your knowledge and practice the commands from this task. [ No Answer Needed ]

TASK 5 - Permissions 101

Remember This :-

Q1) On the deployable machine, who is the owner of "important"? [ u**** ]

"-l" means use a long listing format

Q2) What would the command be to switch to the user "user2"? [ s* ***** ]

Q3) Now switch to this user "user2" using the password "user2" [ No ANswer Needed ]

"su" means switch user

Q4) Output the contents of "important", what is the flag? [ T**{**_*****} ]

just read the important file and u will get the flag

TASK 6 - COMMON DIRECTORIES

Remember this :-

Dir. Name

explanation

/etc

This root directory is one of the most important root directories on your system. The etc folder (short for etcetera) is a commonplace location to store system files that are used by your operating system.

/var

The "/var" directory, with "var" being short for variable data, is one of the main root folders found on a Linux install. This folder stores data that is frequently accessed or written by services or applications running on the system.

/root

Unlike the /home directory, the /root folder is actually the home for the "root" system user.

/tmp

This is a unique root directory found on a Linux install. Short for "temporary", the /tmp directory is volatile and is used to store data that is only needed to be accessed once or twice. Similar to the memory on your computer, once the computer is restarted, the contents of this folder are cleared out.

Q1) Read me! [ No Answer Needed ]

Q2) What is the directory path that would we expect logs to be stored in? [ /var/*** ]

Q3) What root directory is similar to how RAM on a computer works? [ /t** ] (hint :- Similar to the memory/RAM on your computer, once the computer is restarted, the contents of this folder are cleared out.)

Q4) Name the home directory of the root user [ /r*** ]

Q5) Now apply your learning and navigate through these directories on the deployed Linux machine. [ No Answer Needed ]

TASK 7 - Conclusions & Summaries

Q1) Proceed to the next task to continue your learning [ No Answer Needed ]

TASK 8 - Linux Fundamentals Part 3

link of part3 @official_room and its writeup.

Q1 & Q2 [ No Answer Needed ]

END

Last updated

Was this helpful?