1- # Linux Fundamentals Part 1 — Notes
1+ ---
2+ type : resource-note
3+ status : done
4+ created : 2026-03-11
5+ updated : 2026-03-11
6+ tags : [security-writeup, tryhackme, linux, fundamentals]
7+ source : TryHackMe - Linux Fundamentals Part 1
8+ platform : tryhackme
9+ room : Linux Fundamentals Part 1
10+ slug : linux-fundamentals-part-1
11+ path : TryHackMe/20-linux/linux-fundamentals/partI.md
12+ topic : 20-linux
13+ domain : [linux]
14+ skills : [shell-basics, files-perms, enum]
15+ artifacts : [concept-notes, lab-notes]
16+ sanitized : true
17+ ---
18+
19+ # Linux Fundamentals Part 1
220
321---
422
5- ## 1. Context & Goals
23+ ## Summary
624
725** Room:** TryHackMe — * Linux Fundamentals Part 1*
826** Focus:** first contact with Linux CLI and filesystem.
@@ -17,7 +35,9 @@ By the end of this room you should be able to:
1735
1836---
1937
20- ## 2. Where Linux actually lives
38+ ## Key Concepts
39+
40+ ### 2. Where Linux actually lives
2141
2242Linux is not just “hackers’ desktops”. Typical deployment targets:
2343
@@ -34,7 +54,7 @@ For this room, the target is **Ubuntu**.
3454
3555---
3656
37- ## 3. Terminal, shell and process model
57+ ### 3. Terminal, shell and process model
3858
3959You rarely get a full GUI on servers; you mainly interact via a ** terminal** .
4060
@@ -50,7 +70,7 @@ You rarely get a full GUI on servers; you mainly interact via a **terminal**.
5070tryhackme@linux1:~$ # type commands here
5171```
5272
53- ### Conceptual view
73+ #### Conceptual view
5474
5575``` mermaid
5676flowchart LR
@@ -67,9 +87,9 @@ You type into the **terminal**, which passes text to the **shell**, which runs *
6787
6888---
6989
70- ## 4. First commands
90+ ### 4. First commands
7191
72- ### 4.1 ` echo ` — print text
92+ #### 4.1 ` echo ` — print text
7393
7494``` bash
7595$ echo Hello
@@ -82,7 +102,7 @@ Hello Friend!
82102* No spaces → quotes optional.
83103* With spaces → wrap the whole string in quotes.
84104
85- ### 4.2 ` whoami ` — identify current user
105+ #### 4.2 ` whoami ` — identify current user
86106
87107``` bash
88108$ whoami
@@ -93,11 +113,11 @@ Useful in multi-user systems and CTFs to confirm which account you’re in.
93113
94114---
95115
96- ## 5. Interacting with the filesystem
116+ ### 5. Interacting with the filesystem
97117
98118Core mental model: Linux has a ** single rooted tree** (` / ` ), with directories and files.
99119
100- ### 5.1 Listing contents: ` ls `
120+ #### 5.1 Listing contents: ` ls `
101121
102122``` bash
103123$ ls
107127* ` ls ` with no args → list current directory.
108128* ` ls DIR ` → list contents of ` DIR ` without cd’ing into it.
109129
110- ### 5.2 Changing directory: ` cd `
130+ #### 5.2 Changing directory: ` cd `
111131
112132``` bash
113133$ cd Pictures
@@ -121,7 +141,7 @@ Special paths:
121141* ` .. ` = parent directory
122142* ` ~ ` = home directory (e.g. ` /home/ubuntu ` )
123143
124- ### 5.3 Printing current path: ` pwd `
144+ #### 5.3 Printing current path: ` pwd `
125145
126146``` bash
127147$ pwd
@@ -130,7 +150,7 @@ $ pwd
130150
131151Use this when you’re lost or when you want a full path you can re-use later.
132152
133- ### 5.4 Viewing file content: ` cat `
153+ #### 5.4 Viewing file content: ` cat `
134154
135155``` bash
136156$ ls
@@ -147,11 +167,11 @@ Here is something important for me to do later!
147167
148168---
149169
150- ## 6. Searching for files and content
170+ ### 6. Searching for files and content
151171
152172At scale, manual ` cd ` + ` ls ` quickly becomes inefficient. Use ` find ` and ` grep ` .
153173
154- ### 6.1 ` find ` — search by name / pattern
174+ #### 6.1 ` find ` — search by name / pattern
155175
156176** Basic patterns from the room:**
157177
@@ -172,7 +192,7 @@ Notes:
172192* You can specify a starting path: ` find /var -name '*.log' ` .
173193* ` * ` is a wildcard that matches any string in the filename.
174194
175- ### 6.2 ` grep ` — search inside files
195+ #### 6.2 ` grep ` — search inside files
176196
177197` grep ` scans file contents and prints lines that match a pattern:
178198
@@ -194,9 +214,9 @@ Typical use cases in security:
194214
195215---
196216
197- ## 7. Shell operators (very small but very powerful)
217+ ### 7. Shell operators (very small but very powerful)
198218
199- ### 7.1 Background execution: ` & `
219+ #### 7.1 Background execution: ` & `
200220
201221Run long operations in the background so your shell stays usable.
202222
@@ -206,17 +226,17 @@ $ cp huge.iso /mnt/usb &
206226$ # prompt is free again
207227```
208228
209- ### 7.2 Command chaining: ` && `
229+ #### 7.2 Command chaining: ` && `
210230
211231Run command2 ** only if** command1 succeeds (exit status 0).
212232
213233``` bash
214- $ mkdir reports && cd reports
234+ mkdir reports && cd reports
215235```
216236
217237Good pattern for safe chained operations.
218238
219- ### 7.3 Redirect output: ` > `
239+ #### 7.3 Redirect output: ` > `
220240
221241Create/overwrite a file with the output of a command.
222242
228248
229249* If ` welcome ` exists, it will be ** overwritten** .
230250
231- ### 7.4 Append output: ` >> `
251+ #### 7.4 Append output: ` >> `
232252
233253Append to a file instead of overwriting.
234254
@@ -243,7 +263,7 @@ Useful for building logs, reports, or collecting findings.
243263
244264---
245265
246- ## 8. Recap — what this Part 1 gives you
266+ ### 8. Recap — what this Part 1 gives you
247267
248268You now have enough to be ** functional** on a basic Linux host:
249269
@@ -262,7 +282,7 @@ Next steps (beyond this room):
262282
263283---
264284
265- ## 9. Glossary (EN → ZH)
285+ ### 9. Glossary (EN → ZH)
266286
267287* Linux distribution (distro) → Linux 发行版
268288* Terminal → 终端
0 commit comments