The Linux File System
Navigate and permissions.
The Linux File System is a free Ethical Hacking Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Ethical Hacking Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Everything Is a File
In Linux almost everything is represented as a file - regular files, directories, devices, even processes under /proc.
Understanding the file system is the foundation for navigating a compromised machine and spotting interesting data.
The Filesystem Hierarchy
Linux uses a single rooted tree starting at /. Key directories:
/etc- system configuration (and passwords)./home- user home directories./var- logs and variable data./tmp- world-writable temp space, handy for dropping tools./root- the root user home.
Navigating
Move around and list contents with these core commands.
pwd # print working directory
ls -la # list all files with details
cd /etc # change directory
cd ~ # go to your home directoryAbsolute vs Relative Paths
An absolute path starts at root: /var/log/auth.log. A relative path is from where you currently are: ../log/auth.log.
.is the current directory...is the parent directory.
Reading Permission Bits
A long listing shows permissions like -rwxr-xr--:
- First char: file type (
-file,ddirectory,llink). - Then three triplets: owner, group, others.
- Each triplet is read (r), write (w), execute (x).
Numeric Permissions
Permissions also map to octal numbers: r=4, w=2, x=1.
755= rwxr-xr-x (owner full, others read+exec).644= rw-r--r-- (owner read+write, others read).
chmod 755 script.sh
chmod 600 secret.txtOwnership
Every file has an owner and a group. Change them with chown (needs privilege).
chown alice:developers report.txt
ls -l report.txtWhy Permissions Matter to Hackers
Misconfigured permissions are a top route to privilege escalation.
- World-writable scripts run by root can be hijacked.
- Readable
/etc/shadowleaks password hashes. - Sensitive backups left as
644expose secrets.
The SUID Bit
A file with the SUID bit runs with the file owner's privileges, not the caller's. If a SUID-root binary is exploitable, an attacker gains root.
Finding unusual SUID binaries is a classic privilege escalation step.
find / -perm -4000 -type f 2>/dev/nullHidden Files and Links
Files starting with a dot are hidden (.bashrc, .ssh). They often hold credentials and history.
Symbolic links point to other files; ls -l shows them with an arrow. Watch for links that redirect privileged operations.
ls -la ~
cat ~/.ssh/id_rsa 2>/dev/nullMounted Filesystems
Storage is attached to the tree through mount points. Listing mounts reveals extra disks, network shares, or hidden partitions worth exploring on a target.
mount
df -hQuick Check
Interpret an octal permission.
Recap
You mapped the Linux file system:
- Single tree from
/; key dirs/etc,/home,/var,/tmp. - Permissions = owner/group/other triplets of rwx, also octal (755, 644).
- Misconfigured permissions and SUID binaries are prime privesc targets.
Next: the essential commands for working fast in a shell.
Frequently asked questions
Is the “The Linux File System” lesson free?
Yes — the full text of “The Linux File System” is free to read here on the web, and the Ethical Hacking Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Ethical Hacking Academy course, upgrade to CoddyKit PRO.
What will I learn in “The Linux File System”?
Navigate and permissions. You practise Ethical Hacking Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Ethical Hacking Academy?
No prior experience is required. Ethical Hacking Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “The Linux File System” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Ethical Hacking Academy lesson?
Yes. Every Ethical Hacking Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- The Linux File System
- Essential Commands
- User and Process Management
- Networking Commands