Lesson 2 — Linux for Hackers
Most servers, security tools, and hacking distributions run on Linux. Getting comfortable in the terminal is one of the highest value skills you can build.
Why Linux Matters
The vast majority of web servers, cloud infrastructure, and penetration testing tools (like Kali Linux) run on Linux. If you cannot navigate a Linux terminal confidently, most security tooling will be out of reach.
File System Structure
Linux organizes everything as files under a single root directory /. Key locations include:
/etc— system configuration files/var— logs and variable data/home— personal user directories/tmp— temporary files, cleared on reboot
Permissions
Every file has read, write, and execute permissions for the owner, the group, and everyone else. Permissions are commonly shown as a string like rwxr-xr-- or a number like 755. Misconfigured permissions are one of the most common real world security mistakes.
Essential Commands
ls— list files in a directorycd— change directorycat— print a file's contentsgrep— search text inside filesfind— locate files by name or attributeps— list running processesnetstat— view network connections
Users and Privileges
Linux is a multi user system. Regular users have limited permissions, while the root user can do anything on the system. Commands can be run with elevated privileges using sudo.
Why Running as Root Is Dangerous
When you run everyday tasks as root, a single mistake or a single compromised program can damage or take over the entire system. Professionals use a limited account and only elevate to root when necessary, and only for the specific command that needs it.