Linux CLI-tryhackme -Linux Basic Commands

Linux CLI & TryHackMe Lab Walkthrough

Linux Terminal se efficient interaction ke liye basic navigation aur system profiling commands par pakad honi zaruri hai. Chahe aap Cyber Security me SOC Analyst ban rahe ho ya Linux System Administrator—ye fundamental commands daily operations ka base hain.

Is guide me hum Linux CLI Basic Commands ke saath-saath TryHackMe Basic Linux CLI Lab ka step-by-step walkthrough dekhenge.

Part 1: Core Navigation & System Commands

1. Navigation & Inspection (Directory & Files)

  • pwd (Print Working Directory): Ye command aapki current location dikhata hai ki aap kis folder/directory me maujood hain.Bashpwd # Output Example: /home/ubuntu
  • ls (List Directory Contents): Current directory ki files aur folders ko dekhne ke liye use hota hai. Iske zaroori flags:
    • ls -l: File permissions, owner, file size, aur modification date detail me dikhata hai.
    • ls -al: Hidden files (jo . se shuru hoti hain) samet sabhi files ko detailed list me dikhata hai.
    Bashls -al
  • cd (Change Directory): Target directory me move karne ke liye iska istemal hota hai.Bashcd /home/ubuntu/Documents

2. File Searching & Reading

  • find (File Search Utility): System me kisi bhi specific file ka exact path dhoondhne ke liye sabse reliable command.Bashfind ~ -name mission_brief.txt (Yahan ~ ka matlab Home directory aur uske sabhi subdirectories me search karna hai.)
  • cat (Concatenate & Print): Text file ke andar ke contents ko terminal par bina kisi editor ke direct padhne ke liye.Bashcat mission_brief.txt

3. System Profiling & Diagnostics

  • whoami (Current User Identifier): Ye command batata hai ki aap kis user account (e.g., ubuntu, root, kali) se system me logged-in hain.Bashwhoami
  • uname -a (Kernel & Architecture Details): System ki Operating System details, OS kernel version, aur CPU architecture (x86_64, arm) show karta hai.Bashuname -a
  • df -h (Disk Space Usage): Connected storage drives aur partition ka free & used space human-readable format (MB/GB) me dikhata hai.Bashdf -h

Part 2: TryHackMe Basic CLI Lab Walkthrough & QA

Is section me hum TryHackMe Linux Room ke practical questions aur unke solutions ko solve karenge:

Q1. CLI ka full form kya hota hai?

Answer: Command Line Interface (Text-based interface jahan commands type karke OS se interact kiya jata hai).

Q2. Hidden file mission_brief.txt ka full absolute path kya hai?

Command Used:

Bash

find / -name mission_brief.txt 2>/dev/null

Answer: /home/ubuntu/Documents/.research/archive/mission_brief.txt

Q3. mission_brief.txt file read karne par kya flag/message mila?

Command Used:

Bash

cat /home/ubuntu/Documents/.research/archive/mission_brief.txt

Answer: MISSION-FOUND

Q4. Lab machine me current logged-in user (whoami) kaun hai?

Command Used:

Bash

whoami

Answer: ubuntu

Q5. uname -a execute karne par system ka Kernel Version kya hai?

Command Used:

Bash

uname -a

Answer: 6.14.0-1018-aws

Q6. System me df -h command ke anusar kitna Free Disk Space available hai?

Command Used:

Bash

df -h

Answer: 58G (58 Gigabytes)

Q7. day1_report.txt file ka content kya show kar raha hai?

Command Used:

Bash

cat day1_report.txt

Answer: END-OF-DAY1

Summary Cheat-Sheet

RequirementCommand
Check Logged-in Userwhoami
View System Kerneluname -a
Show Hidden Filesls -al
Find File Pathfind / -name "filename"
Check Available Diskdf -h

Leave a Comment

Your email address will not be published. Required fields are marked *