GHOSTNET›MOD · LINUX
SCRIPTING: PYTHON & BASH →
MODULE · LINUX

LINUX MASTERY: THE OPERATOR'S OS

Install & run · The shell · Filesystem · Files & text · Permissions · Users & privilege · Processes & services · Packages · Networking · Hardening & lab building

12
CHAPTERS
~4hr
TOTAL READ
BEGINNER
DIFFICULTY
CORE
IDENTIFIER
BEGINNER~18 min READCHAPTER 1 OF 12

Why Linux Runs the World

KEY POINTS · THE QUICK VERSION
  • Linux is a kernel; a distribution bundles that kernel with tools, a package manager and a desktop to make a usable operating system.
  • Linux powers the vast majority of web servers, all of the top supercomputers, most of the public cloud and, through Android, billions of phones.
  • Open source means you can read, audit, modify and redistribute the code - a property that makes Linux trustworthy for security work.
  • Security tooling targets Linux first because the OS exposes raw sockets, ptrace, /proc and a scriptable shell without fighting you.
  • Learning Linux is learning the machine itself: nearly every other topic on this platform runs on top of it.
Scan these first, then read below for the depth and examples — or jump straight to the lab.

► The Operating System Underneath Everything

Before you can attack, defend, or even understand a modern computer system, you need to understand the software that sits between every program and the hardware: the operating system. On the internet, in the cloud, and inside most of the devices around you, that operating system is Linux. If you are coming from Windows or macOS, this module is where the real picture of computing opens up, because Linux does not hide the machine from you. It hands you the controls.

An operating system has one core job: to share a computer's hardware (CPU, memory, disks, network cards) safely between many running programs. It decides which program runs on the processor right now, stops one program from reading another's memory, and turns a request like "open this file" into the exact electrical signals a disk understands. The piece of software that does this lowest-level work is called the kernel, and the Linux kernel is the beating heart of every Linux system.

► Kernel vs Distribution - The Most Important Distinction

People say "Linux" loosely, but precisely speaking Linux is only the kernel, first released by Linus Torvalds in 1991. A kernel on its own is not something you can use day to day - it is an engine with no car around it. To get a usable system you need a shell to type commands into, utilities like a text editor and a file copier, a way to install new software, and usually a graphical desktop. A distribution (a "distro") is a complete, curated bundle of the Linux kernel plus all of that surrounding software, assembled and maintained by a project or company.

LayerWhat it isExamples
KernelManages CPU, memory, devices, filesystems, networkingLinux (the kernel)
Core utilitiesBasic commands: ls, cp, bash, coreutils, GNU toolsGNU userland, systemd
Package managerInstalls and updates software, resolves dependenciesapt, dnf, pacman
Desktop environmentThe graphical shell: windows, menus, settingsGNOME, KDE, XFCE
DistributionAll of the above, packaged togetherUbuntu, Fedora, Kali, Arch
NOTE
When you "install Linux" you are really installing a distribution. The same kernel can sit under Ubuntu, Fedora, and Kali - what differs is the choice of tools, defaults, release cadence and polish layered on top.

► What Open Source Actually Means

Linux is free and open source software. "Free" here means freedom, not just price: you are legally allowed to run the software for any purpose, read its complete source code, modify it, and share your modified version. The Linux kernel is licensed under the GNU General Public License version 2 (GPLv2). This is not a technicality - it is the reason Linux is trustworthy infrastructure. When the code is public, thousands of engineers, companies, and independent researchers can inspect it for bugs and backdoors. A closed operating system asks you to trust a vendor; an open one lets you verify.

For a security professional this matters enormously. You can read exactly how the kernel handles a network packet, instrument it, patch it, and recompile it. There is no hidden layer you are forbidden from examining. This same transparency is why the global community of developers can respond to a serious vulnerability within hours rather than waiting for a quarterly patch cycle.

► Where Linux Actually Runs

It is easy to underestimate Linux because it rarely sits on the laptop in front of you. But step back and look at the whole of computing, and Linux is nearly everywhere that matters.

DomainLinux presenceWhy
Web serversThe large majority of public web serversStable, scriptable, free to deploy at scale
CloudMost instances on AWS, Azure, GCP are LinuxLightweight, automatable, no per-seat licensing
SupercomputersAll of the TOP500 run LinuxTotal control over hardware and scheduling
MobileAndroid (billions of devices) is built on LinuxThe Android kernel is a Linux kernel
Embedded / IoTRouters, TVs, cars, cameras, industrial controllersSmall, free, endlessly customisable
ContainersDocker and Kubernetes are Linux technologiesNamespaces and cgroups are kernel features

When you connect to almost any website, your request is answered by a Linux server. When you open an app on an Android phone, a Linux kernel schedules it. When a company spins up computing power in the cloud, it is overwhelmingly renting Linux machines. The desktop is the one place Windows and macOS dominate - and even there, Microsoft now ships a real Linux kernel inside Windows through WSL2, which you will meet in Chapter 3.

► Why Hackers and Defenders Live in Linux

Security work gravitates to Linux for concrete, practical reasons, not fashion. First, the tools are built for it: the industry-standard offensive distributions Kali and Parrot are Linux, and the vast majority of open-source security tooling - nmap, Wireshark, Metasploit, John the Ripper, Burp Suite, aircrack-ng - is written for and best supported on Linux. Second, the operating system gives you direct access to the primitives attacks and analysis depend on: raw network sockets for crafting packets, ptrace for debugging and instrumenting other processes, the /proc filesystem that exposes the live state of every process, and packet capture that just works.

Third, and perhaps most important, Linux is scriptable to the core. Every action you can take through a window, you can also take by typing a command - which means you can automate it, chain it, and repeat it a thousand times. An attacker who can script is an attacker who can move at machine speed; a defender who can script is a defender who can watch a thousand servers at once. The shell is not an afterthought bolted onto Linux; it is the native language of the system.

THE SHELL IS THE NATIVE LANGUAGE - A TASTE
# Count how many unique IP addresses hit a web server today,
# sorted by how many requests each one made - one line, no app needed:
cat /var/log/nginx/access.log | awk '{print $1}' | sort | uniq -c | sort -rn | head

# Find every world-writable file on the system (a classic misconfiguration):
find / -type f -perm -0002 2>/dev/null

# Watch new network connections open in real time:
watch -n1 "ss -tunp"
TIP
Do not try to memorise those commands yet - you will build up to all of them in this module. The point is to feel the difference: on Linux, operating the machine and programming the machine are the same act.

► The Mindset Shift

Coming from Windows or macOS, the hardest adjustment is not learning commands - it is accepting that the system expects you to be in charge. It will let you delete critical files, change how the kernel behaves, and rebuild the operating system while it runs. That power is exactly why professionals use it, and exactly why you will spend the next chapter learning to work inside disposable virtual machines and snapshots, so that mistakes cost you seconds, not days.

Everything else on this platform - web attacks, network attacks, Active Directory, malware analysis, red teaming - runs on top of the knowledge in this module. Linux is the core infrastructure. Master it here, and the rest of the curriculum stops feeling like magic and starts feeling like engineering.

RECAP · CHECK YOURSELF
  • Linux is a kernel; a distribution bundles that kernel with tools, a package manager and a desktop to make a usable operating system.
  • Linux powers the vast majority of web servers, all of the top supercomputers, most of the public cloud and, through Android, billions of phones.
  • Open source means you can read, audit, modify and redistribute the code - a property that makes Linux trustworthy for security work.
  • Security tooling targets Linux first because the OS exposes raw sockets, ptrace, /proc and a scriptable shell without fighting you.
  • Learning Linux is learning the machine itself: nearly every other topic on this platform runs on top of it.
Read to the end to count this chapter
▸ READY TO PRACTISE
You've now covered enough for Lab steps 1–1 of 22. Try them in the lab while it's fresh.
OPEN LAB ▸
⚡ TEST YOURSELF
End-of-chapter quiz
A dozen questions — recall and practical. Graded, earns up to 20 XP.
PRACTISE IN THE LAB ▸
READY TO PRACTICE?
Linux Interactive Lab: First Boot
22 steps · 330 XP · Real commands · Flag captures
LAUNCH LAB →
SCRIPTING: PYTHON & BASH →