概要
TryHackMe:Linux Fundamentals Part1のwalkthroughです。
このルームではLinuxの基礎を学習できます。
Task2
Q1.Research: What year was the first release of a Linux operating system?
A.1991
Task4
Q1.If we wanted to output the text "TryHackMe", what would our command be?
A.echo TryHackMe
Q2.What is the username of who you're logged in as on your deployed Linux machine?
whoami
コマンドから確認できます。
$ whoami
tryhackme
A.tryhackme
Task5
Q1.On the Linux machine that you deploy, how many folders are there?
ls
コマンドでフォルダ数を確認します。
$ ls
access.log folder1 folder2 folder3 folder4
A.4
Q2.Which directory contains a file?
Hint.We've discussed about a certain command that can be used to list contents of directories
ls
コマンドでフォルダの中身を確認します。
tryhackme@linux1:~$ ls folder1
tryhackme@linux1:~$ ls folder2
tryhackme@linux1:~$ ls folder3
tryhackme@linux1:~$ ls folder4
note.txt
A.folder4
Q3.What is the contents of this file?
cat
コマンドでファイルの中身を表示します。
$ cat ./folder4/note.txt
Hello World!
A.Hello World!
Q4.Use the cd command to navigate to this file and find out the new current working directory. What is the path?
cd
コマンドでfolder4
へ移動し、pwd
コマンドでパスを表示します。
$ cd ./folder4
tryhackme@linux1:~/folder4$ pwd
/home/tryhackme/folder4
A./home/tryhackme/folder4
Task6
Q1.Use grep on "access.log" to find the flag that has a prefix of "THM". What is the flag?
Hint.grep "THM" access.log
grep
コマンドを使用してTHM
でマッチする文字列を探します。
$ grep "THM" access.log
13.127.130.212 - - [04/May/2021:08:35:26 +0000] "GET THM{ACCESS} lang
=en HTTP/1.1" 404 360 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/53
7.36"
A.THM{ACCESS}
Task7
Q1.If we wanted to run a command in the background, what operator would we want to use?
A.&
Q2.If I wanted to replace the contents of a file named "passwords" with the word "password123", what would my command be?
Hint.echo <content> > <filename>
A.echo passwords > password123
Q3.Now if I wanted to add "tryhackme" to this file named "passwords" but also keep "passwords123", what would my command be
Hint.echo <content> >> <filename>
A.echo tryhackme >> passwords123