Linux Session
Linux Session
💡 Demo Idea: Boot into an Ubuntu VM and guide attendees through basic setup.
3️⃣ Linux File System Structure
/home – User files (like "Documents" on Windows).
Linux session 1
/bin , /sbin , /usr/bin – Where Linux stores system programs.
💡 Exercise:
1. Create a directory: mkdir my_project
Linux session 2
💡 Exercise: Open nano test.txt , type something, save with CTRL + X , Y , Enter .
🔍 Permissions Breakdown:
rwxr--r--
💡 Exercise:
1. Create a file: touch secret.txt
💡 Exercise: Run top , find a process, and kill it with kill <PID> .
Linux session 3
8️⃣ Networking Basics
Command Purpose Example
ip a Shows network interfaces ip a
#!/bin/bash
echo "Hello, $USER! Today is $(date)."
💡 Exercise: Save this as hello.sh , then run chmod +x hello.sh && ./hello.sh .
🔟 Security Essentials
Command Purpose Example
gpg Encrypts files gpg -c secret.txt
💡 Exercise: Encrypt a file with gpg -c myfile.txt , then try to open it!
apt moo
or
sl
Linux session 5
✅ Encourage Questions – No question is too basic!
✅ Give a Cheat Sheet – Provide a list of essential commands.
✅ Provide a Challenge – Let participants solve a problem.
🔥 Need More Help?
Want a custom lab setup for your session? Or a CTF-style challenge? Let me
know, and I’ll design one! 🚀
🔎 Basic Syntax
find [starting_directory] [options] [expression]
commands, etc.).
Linux session 6
2️⃣ Case-Insensitive Search
find /home -iname "file.txt"
Linux session 8
🔍 Finds all files in
.php /var/www and sets permissions to 644 (readable by all,
writable by owner).
🔍 Finds files that were last accessed more than 30 days ago.
📌 Find and Delete Files Older Than 7 Days
find /tmp -type f -mtime +7 -delete
📌(Permissions)
Understanding chmod Numbers
User (owner)
Group
Linux session 9
Others (everyone else)
0 → No permission (---)
Linux session 10
Why? Owner can edit and run it, but others can only execute.
So:
chmod 500 file.txt → Owner can read & execute, but cannot modify.
Linux session 11
chmod 550 file.txt → Owner and Group can read & execute, but cannot modify.
chmod 555 file.txt → Everyone can read & execute, but not modify.
🚀 Final Notes
Use find to locate files based on size, time, or name.
Linux session 12