Linux, Servers & Code

Linux, Servers & Code: The Complete Systems Guide

Understand what actually happens inside your computer, then put it to work: how the Linux kernel, bootloader and distros fit together, a hands-on terminal tutorial, how to set up and secure a real server, how to configure your home router, and beginner-friendly fundamentals for Python, Java, HTML and Android — everything you need to go from "I click icons" to "I understand and control my systems."

Beginner friendly Kernel · Distros · GRUB · systemd Servers · Routers · Networking Python · Java · HTML · Android

Before you start. Practice terminal and server commands on a spare machine, a cheap single-board computer, or a virtual machine first — not on the only computer you can't afford to break. Commands like rm, chmod and anything run with sudo can cause real data loss if mistyped. This guide is educational reference material; always check your specific distro's documentation for exact package names and file paths, which vary between distributions.

Why Learn How Your Systems Actually Work

Every website you visit runs on a server, most of those servers run Linux, most of the internet's routers and switches run a Linux-derived operating system, and the phone in your pocket is Linux underneath its Android skin. Learning the fundamentals here — the kernel, the shell, how a boot process works, how software talks to a network — is the single highest-leverage skill in all of technology, because it's the same handful of ideas showing up everywhere.

New to all of this? Start with the How Linux Works tab for the concepts, then move to Command Line Basics for hands-on practice. Already comfortable with Linux basics? Jump straight to whichever tab matches what you're building.
What You'll Learn
  • What a kernel actually does, and how a distro is built on top of it
  • How a Linux machine boots, from power-on to login (BIOS/UEFI, GRUB, init)
  • Real terminal commands: navigation, files, permissions, processes, packages
  • How to set up, secure and administer a headless Linux server
  • How to configure your home router: DHCP, port forwarding, Wi-Fi security
  • The core syntax and first script for Python, Java, HTML and Android
How to Use This Guide

Work through the systems tabs in order if you're new to Linux; jump straight to a language tab if you already know your way around a terminal. Every section is self-contained, so bookmark this page and come back to whichever topic you need.

Already Have Hardware to Practice On?

If you don't yet have a machine to experiment on, our Build Your Own Home Server guide walks through repurposing an old PC, buying a Raspberry Pi, or building a dedicated box — the perfect low-stakes place to apply everything in the Server Setup and Router tabs below.

What Is an Operating System, and What Is Linux?

An operating system is the software layer that sits between your hardware and every program you run, managing memory, the CPU, storage, and every connected device so applications don't need to talk to hardware directly. Linux is, strictly speaking, just the kernel — the core piece that does that management. What people casually call "Linux" (Ubuntu, Fedora, Debian, and so on) is technically GNU/Linux: the Linux kernel bundled with the GNU tools, a package manager, and a set of default applications into a complete, usable operating system.

The Layers, Bottom to Top
Hardware CPU, RAM, disks, network card, GPU
Kernel process scheduling, memory, drivers, system calls
System & libraries systemd, glibc, core utilities
Shell & package manager bash/zsh, apt/dnf/pacman
Applications everything you actually open and use

This is also why the Android tab exists on this page: Android uses this exact same Linux kernel at its base, with a very different set of layers stacked on top.

What the Kernel Is Actually Doing
ResponsibilityIn plain terms
Process schedulingDecides which program gets the CPU, and for how long, thousands of times per second
Memory managementAllocates RAM to programs and keeps them from overwriting each other
Device driversTalks to your disk, network card, GPU and every other piece of hardware
System callsThe controlled "front door" apps use to ask the kernel to do something
Filesystem accessReads and writes files, and enforces who is allowed to touch what
The Filesystem Hierarchy Standard (FHS)
PathWhat lives there
/etcSystem-wide configuration files
/homePersonal files and settings for each user
/varVariable data: logs, caches, databases, mail queues
/usrInstalled programs and their supporting files
/bin, /sbinEssential command binaries, incl. admin-only tools
/bootThe kernel image, initramfs, and GRUB's own files
/devDevice files representing hardware (disks, terminals)
/proc, /sysVirtual files exposing live kernel and process info
/tmpTemporary files, usually cleared on reboot
Distributions: The Kernel Plus Everything Around It

A "distro" packages the Linux kernel with a package manager, default software, and its own configuration philosophy. Nearly every distro traces back to one of a handful of families — knowing the family tells you which commands and package names to expect.

FamilyExamplesPackage managerBest for
DebianDebian, Ubuntu, Linux Mint, Raspberry Pi OSaptBeginners, servers, huge community support
Red HatFedora, RHEL, Rocky Linux, AlmaLinuxdnfEnterprise servers, cutting-edge desktop (Fedora)
ArchArch Linux, Manjaro, EndeavourOSpacmanAdvanced users who want full control and the latest packages
SUSEopenSUSE, SUSE Linux EnterprisezypperEnterprise environments, robust admin tooling (YaST)
Choosing your first distro: Linux Mint or Ubuntu Desktop for a beginner-friendly daily-driver desktop; Ubuntu Server or Debian for your first headless server (widest tutorial coverage online); Raspberry Pi OS if you're on a Raspberry Pi. Save Arch for once you're already comfortable in the terminal.
The Boot Process, Step by Step

From pressing the power button to a login prompt, a Linux machine passes through the same handful of stages every time.

1BIOS / UEFI

Firmware built into the motherboard runs first, checks the hardware (POST), and hands control to the bootloader on the drive marked bootable.

2GRUB Bootloader

Shows the boot menu (if enabled), then loads the Linux kernel and an initial RAM disk (initramfs) into memory. Covered in full detail below.

3Kernel Initialization

The kernel takes over, detects hardware, mounts the real root filesystem, and starts the very first process: PID 1.

4Init System (systemd)

PID 1 starts every other service in the correct order — networking, logging, your desktop environment or login prompt.

5Login

A login manager (graphical) or a plain terminal prompt (headless server) waits for you to authenticate and starts your session.

GRUB: The Bootloader, Explained

GRUB (GRand Unified Bootloader) is the software that runs immediately after the firmware and is responsible for finding and starting your operating system — or letting you choose between several, if you dual-boot.

/boot/grub/grub.cfgThe generated config GRUB actually reads — don't hand-edit it
/etc/default/grubThe file you do edit (timeout, default entry, kernel options)
update-grubRegenerates grub.cfg on Debian/Ubuntu after a config change
grub-mkconfig -o …The underlying command update-grub wraps, used on other distros

Holding Shift (BIOS) or repeatedly tapping Esc (UEFI) at boot reveals the GRUB menu — useful for booting an older kernel, entering recovery mode, or fixing a system that won't start normally.

Init Systems: systemd & systemctl

Almost every modern distro uses systemd as PID 1, replacing the older SysVinit scripts. You'll use its systemctl command constantly — it comes back in the Server Setup tab for managing your own services.

systemctl status NAMECheck if a service is running
systemctl start/stop NAMEStart or stop it right now
systemctl enable/disable NAMESet (or unset) it to start automatically at boot
journalctl -u NAMERead that service's logs
Why the Terminal Is Worth Learning

A graphical file manager can't SSH into a headless server, script a repeated task, or tell you exactly why a service failed. The terminal is slower at first and dramatically faster forever after — every command below works on virtually any Linux distro, and most carry over directly to macOS.

Navigating the Filesystem
CommandDoesExample
pwdPrint the current directorypwd
lsList files (add -la for hidden files + details)ls -la
cdChange directory (cd .. goes up one level)cd /var/log
mkdirCreate a new directorymkdir projects
cpCopy a file or folder (-r for folders)cp -r site/ backup/
mvMove or rename a filemv old.txt new.txt
rmDelete a file (-r for folders) — no undo, no trashrm -r old-build/
findSearch for files by name, type or agefind . -name "*.log"
The most common beginner mistake: rm -rf deletes without confirmation and without a trash bin. Double-check the path before pressing Enter, especially with wildcards.
Viewing & Editing Files
cat filePrint a whole file to the screen
less fileScroll through a long file (q to quit)
head / tailShow the first / last lines (tail -f follows live)
nano fileBeginner-friendly terminal text editor
grep "text" fileSearch inside a file for matching lines

Once you're comfortable, vim is dramatically faster once learned but has a real learning curve — nano is the better starting point.

Users, Groups & Permissions

Every file has an owner, a group, and three permission sets (owner / group / everyone else), each with read, write and execute bits.

$ ls -l script.sh -rwxr-xr-- 1 alex staff 812 Sep 3 09:12 script.sh
chmod 755 fileOwner: read/write/execute, others: read/execute
chmod +x fileAdd execute permission for everyone
chown user:group fileChange who owns the file
sudo commandRun one command with administrator privileges
Processes & System Monitoring
ps auxList every running process
top / htopLive, interactive process & resource monitor
kill PIDAsk a process to stop (kill -9 forces it)
df -hShow disk space usage, human-readable
free -hShow RAM and swap usage
Package Management by Distro Family
Taskaptdnfpacman
Installinstallinstall-S
Removeremoveremove-R
Update allupdate && upgradeupgrade-Syu
Searchsearchsearch-Ss
Piping & Redirection — Chaining Commands Together

This is where the terminal starts to feel powerful: instead of one command at a time, you connect commands so the output of one becomes the input of the next.

$ ps aux | grep nginx # pipe: filter one command's output through another $ echo "hello" > file.txt # redirect: overwrite file.txt with "hello" $ echo "again" >> file.txt # append instead of overwrite $ long-task & # run in the background, keep using the terminal
From Desktop to Server

A server is usually "headless" — no monitor, no keyboard, running quietly in a corner or a closet. You administer it entirely over the network, almost always through SSH. Everything below assumes a Debian/Ubuntu-family server; the concepts carry over to every distro, only the exact package names change.

Don't have a server yet? Our Build Your Own Home Server guide covers picking hardware and choosing software for your exact use case (media, backups, game servers, home automation) — come back here once it's booted and reachable over SSH.
Connecting Over SSH
$ ssh username@192.168.1.50 $ ssh-keygen -t ed25519 # generate a key pair $ ssh-copy-id username@192.168.1.50 # install your public key on the server

Once key-based login works, harden it in /etc/ssh/sshd_config:

PasswordAuthentication noRequire a key — blocks brute-force password guessing
PermitRootLogin noForces admins to log in as a normal user, then sudo
Port 2222Optional — moves SSH off the default port 22

Restart the service to apply changes: sudo systemctl restart ssh. Keep an existing session open while you test a new one, so a config mistake can't lock you out.

Managing Services With systemd

Every long-running program on your server — a web server, a game server, your own script — should run as a systemd service so it starts on boot and restarts if it crashes.

[Unit] Description=My Custom App After=network.target [Service] ExecStart=/usr/bin/python3 /opt/app/main.py Restart=on-failure User=appuser [Install] WantedBy=multi-user.target

Save as /etc/systemd/system/myapp.service, then:

$ sudo systemctl daemon-reload $ sudo systemctl enable --now myapp
Firewall Basics
Taskufw (Debian/Ubuntu)firewalld (RHEL/Fedora)
Enableufw enable--add-service=ssh
Allow a portufw allow 22/tcp--add-port=22/tcp
Check statusufw status--list-all
Enable SSH access first, before turning the firewall on — locking yourself out of a headless server means a trip to physically plug in a monitor.
Automating Tasks With Cron

Cron runs commands on a schedule — backups, updates, cleanup scripts. Edit your schedule with crontab -e.

# min hour day month weekday command 0 3 * * * /opt/scripts/backup.sh */15 * * * * /opt/scripts/check.sh 0 0 1 * * /opt/scripts/monthly-report.sh

Read top to bottom: minute, hour, day-of-month, month, day-of-week — an asterisk means "every."

Keeping It Updated & Secure
  • Update regularly: sudo apt update && sudo apt upgrade
  • Enable automatic security updates (unattended-upgrades on Debian/Ubuntu)
  • Install fail2ban to auto-block repeated failed login attempts
  • Change every default username and password immediately after setup
  • Only expose to the internet what genuinely needs to be reachable — see the Router tab for VPN alternatives to port forwarding
Giving Your Server a Fixed Local IP

A server whose address changes breaks every bookmark and script pointed at it. The cleanest fix is a DHCP reservation on your router (covered in the next tab) rather than a static IP set on the server itself — it stays consistent even if you reinstall the OS.

On Ubuntu Server, network config lives in /etc/netplan/*.yaml; run sudo netplan apply after editing.
Finding & Accessing Your Router

Your router is the device that connects your home network to the internet and hands out local addresses to everything else — it's also almost always the most under-secured device in the house, since most people never open its settings after the initial setup.

$ ip route # Linux — look for "default via ___" $ ipconfig # Windows — look for "Default Gateway"

That address (commonly 192.168.0.1 or 192.168.1.1) opened in a browser is your router's admin panel. Change the default admin password the first time you log in — it's printed on a label on the router and public knowledge for that model.

Key Router Settings, Explained
SettingWhat it does
DHCP rangeThe pool of local IPs the router hands out automatically to new devices
DHCP reservationPins one device's MAC address to always receive the same local IP
Port forwardingRoutes incoming internet traffic on a specific port to one device inside your network
DNS settingsWhich server translates domain names to IP addresses for your whole network
Wi-Fi securityShould be WPA3, or WPA2 if your hardware is older — never WEP or open
Guest networkA separate Wi-Fi network isolated from your main devices
Firmware updatesPatches security holes — check periodically, since most routers don't auto-update
DHCP Reservation Walkthrough
  1. Find your device's MAC address (ip link on Linux, printed on the device, or listed in the router's connected-devices page)
  2. Open your router's DHCP or LAN settings and look for "Address Reservation" or "Static Lease"
  3. Enter the MAC address and the local IP you want it to always receive
  4. Reboot the device once to confirm it picks up the reserved address
Port Forwarding — Use Carefully

Port forwarding opens a direct path from the internet to one device — genuinely useful, but every open port is one more thing to secure.

  1. Give the target device a DHCP reservation first (above)
  2. In the router's Port Forwarding section, map an external port to that device's internal IP and port
  3. Test from outside your network (mobile data works well) — a local test can succeed even when the internet-facing rule is wrong
Safer alternative: a mesh VPN like Tailscale or WireGuard reaches your home devices without opening any ports to the public internet at all — see the Home Server guide's Networking tab for the full comparison.
VLANs & Guest Networks

Smart plugs, cameras and other IoT devices have a poor security track record. A guest network or VLAN keeps them on a separate segment that can reach the internet but not your main computers, phones or server — so a compromised lightbulb can't be used to reach anything that actually matters.

Basic Network Troubleshooting
ping 8.8.8.8Is there a working connection at all?
traceroute hostWhere along the path is traffic slowing or stopping?
dig / nslookup hostIs DNS resolving the domain to the right IP?
ip aWhat IP, and which network interfaces, does this machine have?
Python Fundamentals

Python reads almost like plain English, which makes it the most common first programming language — and it scales all the way up to automation scripts, home-automation glue code, data science and full web backends.

Installing Python
Debian/Ubuntusudo apt install python3 python3-pip
Fedorasudo dnf install python3
macOSbrew install python
Windowswinget install Python.Python.3

Check it worked: python3 --version

Your First Script
print("Hello, KreatedByU!") name = input("What's your name? ") print(f"Nice to meet you, {name}")

Save as hello.py, then run: python3 hello.py

Core Syntax Cheat Sheet
x = 10 # variable, no type declaration needed name = "Alex" # string items = ["saw", "drill"] # list specs = {"cpu": "i5", "ram": 16} # dictionary if x > 5: print("big") else: print("small") for item in items: print(item) def greet(name): return f"Hi, {name}"
Virtual Environments & Packages

A virtual environment keeps each project's packages separate, so installing one project's dependencies never breaks another's.

$ python3 -m venv myenv $ source myenv/bin/activate $ pip install requests $ pip freeze > requirements.txt
Where to Go Next
  • Automation scripts for repetitive terminal tasks
  • Home automation and Raspberry Pi projects (pairs well with the Server tab)
  • Web backends with Flask or Django
  • Data analysis with pandas, or basic machine learning
Java Fundamentals

Java compiles to bytecode that runs on the Java Virtual Machine (JVM), so the same program runs unchanged on Linux, Windows or macOS — "write once, run anywhere." It's strongly typed and object-oriented, and it's the traditional language behind native Android apps, which is why it reappears in the Android tab.

Installing the JDK
Debian/Ubuntusudo apt install default-jdk
Fedorasudo dnf install java-latest-openjdk
macOSbrew install openjdk

Check it worked: java -version and javac -version

Your First Program
public class Hello { public static void main(String[] args) { System.out.println("Hello, KreatedByU!"); } }

Save as Hello.java, then: javac Hello.java && java Hello

Core Syntax Cheat Sheet
int count = 10; // every variable is explicitly typed String name = "Alex"; boolean active = true; if (count > 5) { System.out.println("big"); } else { System.out.println("small"); } for (int i = 0; i < count; i++) { System.out.println(i); } class Tool { String name; Tool(String name) { this.name = name; } void use() { System.out.println("Using " + name); } }
Object-Oriented Basics

Java organizes code around classes (blueprints) and objects (instances of them). A class can extend another to inherit its behavior, and interfaces define a contract multiple unrelated classes can implement.

Build Tools & Where Java Is Used

Real projects use Maven or Gradle to manage dependencies and builds instead of compiling by hand. Java (and Kotlin alongside it) powers native Android apps, huge enterprise backends, and Minecraft's original codebase.

HTML & Web Fundamentals

Every web page — including the interactive tools throughout this very site — is built from three layers: HTML for structure and content, CSS for appearance, and JavaScript for behavior. Learn these three and you can build, or at least read and modify, almost anything on the web.

Anatomy of an HTML Page
<!DOCTYPE html> <html lang="en"> <head> <title>My Page</title> </head> <body> <h1>Hello, KreatedByU!</h1> <p>This is a paragraph.</p> </body> </html>
Common Tags Reference
<h1>–<h6>Headings, largest to smallest
<p>A paragraph of text
<a href="">A hyperlink
<img src="">An image
<div>, <span>Generic containers (block vs. inline)
<ul>, <li>A bulleted list and its items
<form>, <input>A form and its input fields
Adding Style With CSS
h1 { color: #0891a8; font-size: 28px; } .card { border: 1px solid #ddd; border-radius: 8px; padding: 16px; }
Adding Interactivity With JavaScript
document.querySelector("button") .addEventListener("click", function () { alert("You clicked it!"); });
This exact skillset — plain HTML, CSS and a touch of JavaScript — is what powers every interactive tool and calculator across this site, built as lightweight, dependency-free snippets for speed. Your browser's "View Page Source" and Developer Tools (F12) are free, built-in ways to see how any page on the web is put together.
Android Fundamentals

Android is built directly on top of the Linux kernel from the How Linux Works tab — the same process scheduling, memory management and permission model, with Google's own layers stacked on top for apps and touch interfaces.

The Android Stack
Hardware phone/tablet CPU, radios, sensors
Linux Kernel same core as any Linux distro, plus mobile-specific drivers
Hardware Abstraction Layer (HAL) standardizes how apps reach the camera, GPS, etc.
Android Runtime (ART) runs compiled app code, replacing the older Dalvik VM
Java/Kotlin APIs & Apps everything you actually tap and open
ADB: The Android Debug Bridge

ADB is a terminal tool that talks directly to an Android device over USB (or Wi-Fi) — the same "learn the command line" payoff from earlier tabs, applied to your phone.

adb devicesList connected devices
adb install app.apkInstall an app package
adb shellOpen a Linux shell on the device itself
adb logcatStream live system and app logs
adb pull / pushCopy files off / onto the device

Enable it on the device first: Settings → About Phone → tap "Build Number" 7 times → Developer Options → USB Debugging.

App Development Basics

Native Android apps are written in Kotlin (now Google's preferred language) or Java from the tab above, built in Android Studio. Every screen is built around an Activity with its own lifecycle: created, started, resumed, paused, stopped, destroyed.

Root Access — What It Is, and the Trade-offs

"Rooting" grants apps and the user the same unrestricted administrator access on Android that sudo grants on a Linux desktop — full filesystem access, the ability to remove pre-installed apps, and deep customization. The exact process is device- and manufacturer-specific and changes often, so this guide won't walk through steps that go stale within months — search your exact device model for a current, reputable guide if you choose to pursue it.

Know the trade-offs first: rooting typically voids your warranty, can trip banking-app and streaming-app safety checks, and — if done with the wrong tool for your device — can "brick" (permanently disable) it. Always back up first, and only use tools specifically documented for your exact model.
Gear Worth Having on Hand

Nothing here is required to start — a spare laptop and free software cover everything on this page. These make the learning curve smoother once you're hooked.

Getting Linux Onto Real Hardware
USB 3.0 Flash Drive (32GB+)
For creating bootable installer USBs — keep one dedicated to this.
Check Price
Raspberry Pi Starter Kit
Board, case, power supply and microSD bundled — the cheapest real Linux machine to practice on.
Check Price
External SSD
Run Linux from a portable drive without touching your main machine's install.
Check Price
Learning & Comfort
Linux Command Line Reference Book
A physical reference beats switching windows constantly while you're still learning.
Check Price
Mechanical Keyboard
You'll be typing a lot more than clicking — a comfortable keyboard genuinely matters.
Check Price
Ethernet Cable (Cat6)
A wired connection to your router avoids Wi-Fi flakiness while you practice networking.
Check Price

Some links on this page are affiliate links — if you buy through them we may earn a small commission at no extra cost to you. Replace the placeholder links above with your own Pretty Links before publishing.