Linux CLI Basics – Advent of Cyber 2025 (TryHackMe Lab #2)
Introduction
Learning Linux CLI Basics is a core requirement for anyone stepping into cybersecurity, system administration, or ethical hacking. As part of Advent of Cyber 2025, I started the TryHackMe Lab #2 – Linux CLI: Shells & Bells, which focuses on building real command-line skills in a structured and legal lab environment.
This post documents my hands-on learning experience, explains each command clearly, and helps beginners understand why Linux CLI matters. Everything shown here is performed inside authorized TryHackMe machines using Kali Linux.
⚠️ Disclaimer: This article is purely educational and follows ethical cybersecurity practices. No real-world systems are targeted.
Lab Requirements
- Kali Linux (Virtual Machine or Bare Metal)
- TryHackMe account
- Active internet connection
Step 1: Connect to TryHackMe VPN
Download the VPN configuration file from your TryHackMe account and connect using the terminal:
sudo openvpn ~/Downloads/filename.ovpn
Once connected successfully, you can access the lab machines securely.
Step 2: Start the Lab Machine & SSH Login
After starting the lab, TryHackMe provides an IP address and SSH credentials.
ssh mcskidy@10.49.138.126 -p 22
- Type yes when prompted
- Enter the password provided by the lab
You are now connected to the Linux system.
Linux CLI Basics – Part 1: Essential Linux Commands
Echo Command
Print text to the terminal:
echo "Hello world! Hi by"
List Files (ls)
View files in the current directory:
ls
Read File Content (cat)
Display file contents:
cat wow.txt
Linux CLI Basics – Part 2: Directory Navigation Commands
Change Directory (cd)
cd /home/mcskidy/Guides
Present Working Directory (pwd)
pwd
Linux CLI Basics – Part 3: Understanding Hidden Files
Files starting with a dot (.) are hidden in Linux.
ls -a
ls -l
ls -la
ls -ashows hidden filesls -lashows details with permissions
Linux CLI Basics – Part 4: Exploring System Logs (/var/log)
System login and authentication logs are stored here.
cd /var/log
ls
cat auth.log
Search Logs with grep
grep "Failed password" auth.log
This filters failed login attempts from logs.
Linux CLI Basics – Part 5: Searching Files with find Command
find /home/socmas -name "egg"
Searches for specific files across directories.
Linux CLI Basics – Part 6: Sorting and Filtering Data
cat file.txt | sort | uniq
Helps identify unique entries inside files.
Linux CLI Basics – Part 7: Root Access and System Files
Become Super User
sudo su
View Password Hash File (Educational)
cat /etc/shadow
Passwords are stored as hashed values, not plain text.
Linux CLI Basics – Part 8: Bash History and Command Tracking
ls -al
cat .bash_history
Shows previously executed commands.
Key Learnings from Linux CLI Basics Lab
By completing this TryHackMe lab, I learned:
- How Linux CLI Basics work in real environments
- Secure SSH access using Kali Linux
- File and directory management using core commands
- Identifying hidden files and permissions
- Reading and filtering system logs
- Understanding root privileges safely
- Importance of ethical lab-based learning
Final Thoughts on Linux CLI Basics
Mastering Linux CLI Basics is not optional — it is essential for anyone serious about cybersecurity or Linux administration. This TryHackMe lab helped me move from basic command usage to understanding how Linux systems log activity and manage users.
Practicing in platforms like TryHackMe ensures learning stays legal, safe, and professional. I highly recommend beginners to start with Linux CLI before moving to advanced topics.
Educational & Legal Disclaimer
This article is written strictly for educational purposes. All demonstrations were performed inside authorized virtual lab environments. The author does not support illegal hacking, unauthorized access, or misuse of knowledge.
Frequently Asked Questions (FAQs)
What are Linux CLI Basics?
Linux CLI Basics refer to fundamental command-line skills required to interact with Linux systems efficiently.
Is learning Linux CLI necessary for cybersecurity?
Yes. Almost all cybersecurity tools and environments rely heavily on Linux command-line usage.
Is this TryHackMe lab beginner-friendly?
Absolutely. The lab is designed for beginners and explains commands step by step.