Exploring Key Linux Directories: /etc, /var, /root, and /tmp

Today’s TryHackMe session took me deeper into the structure of a Linux system. Instead of just running commands, I explored where important files live and why each location matters. This felt like stepping behind the curtain to see the backstage of the operating system.
/etc - The Nerve Center of Configuration
The /etc
directory is one of the most critical parts of a Linux system. It stores configuration files that the system and applications rely on to function properly.
One interesting file here is sudoers, which lists which users and groups can run commands as root. I also spotted passwd
and shadow
— the files that store user account details and hashed passwords.
/var - Where the System Leaves Its Footprints
The /var
directory, short for “variable,” is where Linux keeps data that changes frequently. This includes log files in /var/log
, which record events and activity from services and applications. /var
also stores things like: mail, print queues, and databases, but logs are its most important use in security work. These logs are a goldmine for troubleshooting and security analysis. I can see why sysadmins and pentesters pay close attention to this folder.
/root - The Root User’s Home
While /home
stores regular user folders, /root
is the private space for the root user. It’s where the system administrator’s personal files live. I imagine this is also where sensitive tools or data might be kept on a real target machine.
/tmp - The Temporary Playground
The /tmp
directory is like the system’s short-term memory. It stores temporary files and gets wiped when the system restarts. The cool part is that any user can write to it by default. This makes it useful for pentesting - for example, to drop scripts or files during a session without leaving traces after a reboot.
Takeaway from Today
Learning about these directories changed how I see the Linux filesystem. It’s not just random folders — it’s a structured system where each location serves a purpose. The more I learn, the more I start to think like someone who reads a system, not just uses it.
Subscribe to my newsletter
Read articles from Andrii R directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
