Linux from the ground up — what an operating system actually is, the history and anatomy of Linux, then the daily-driver skills: files, directories, paths, permissions, links and command syntax. A structured reference to keep beside your terminal while you learn.
A polished, structured companion guide built from the full course transcript — Imran Afzal's Complete Linux Training Course to Get Your Dream IT Job. Use this as your reference while following along in your own lab.
Wikipedia's definition:An operating system is system software that manages computer hardware and software resources and provides common services for computer programs.
In plain English: An OS (Operating System) is software that acts as a middleman / bridge between the computer hardware and the user (you). It gives you an interface and controls the hardware so other software can function.
+-------------------+ | USER (You) | +-------------------+ | v +---------------------------------------+ | OPERATING SYSTEM | | Middleman / Bridge — manages | | hardware & provides services | +---------------------------------------+ | v +---------------------------------------+ | COMPUTER HARDWARE | +---------------------------------------+ Example: you click "print" -> OS tells the printer hardware what to do
1970 1983 1991 1994 2007 | | | | | v v v v vUnix born GNU Project Linux kernel v1.0 released AndroidAT&T Bell Labs Richard Stallman Linus Torvalds, 21 176,000 lines Google,(Thompson & Free tools, "Just a hobby..." of code Linux-based, Ritchie) no kernel yet mobile boom Kernel (0.01) -> Kernel + GNU tools = "Linux" -> grew via internet collaboration into distros
Year
Event
1970
Unix developed at AT&T Bell Labs by Ken Thompson & Dennis Ritchie. Revolutionary, but not freely available (proprietary versions).
1983
Richard Stallman launches the GNU Project ("GNU's Not Unix") — free tools & utilities, but no kernel.
1991
Linus Torvalds, a 21-year-old Finnish student, starts building a free OS kernel as a hobby. On Aug 25, 1991 he posts on the Minix newsgroup: "I'm doing a free operating system... just a hobby, won't be big and professional like GNU."
Sept 1991
Kernel v0.01 released — not functional, released for public feedback.
Late 1991
v0.02 released — functional, combined with GNU tools = a complete free OS. This combo became known simply as "Linux" (some argue it should be called GNU/Linux).
Early 1990s
Rapid growth via internet collaboration → distros like Slackware, Debian emerge.
1994
v1.0 released — 176,000 lines of code.
Late 1990s
Red Hat and SUSE offer commercial support → viable for business.
2000
Big adoption in server markets, embedded systems, supercomputers.
2007
Google releases Android (Linux-based) → huge boost in mobile.
Today
Powers mobile devices, PCs, servers, mainframes, and supercomputers.
Most popular for beginners; based on Debian; backed by Canonical
Fedora
Sponsored by Red Hat; cutting-edge features; has Workstation/Server/Silverblue variants
Debian
Community-driven, very stable; the foundation for Ubuntu
Red Hat Enterprise Linux (RHEL)
Backed by Red Hat; built for business; used by ~70–80% of corporate environments
CentOS / CentOS Stream
Free, open-source clone of RHEL; direction changed after CentOS 8 (see box below)
Arch Linux
Rolling release; build-your-own-system philosophy; simplified version = Manjaro
openSUSE
Tumbleweed (rolling) & Leap (regular release); sponsored by SUSE
Linux Mint
Based on Ubuntu; traditional desktop feel, built-in media tools
Gentoo
Source-based; users compile from source; highly customizable
Slackware
One of the oldest distros; minimalist
Alpine Linux
Lightweight, security-focused; popular for containers
Kali Linux
Built for digital forensics & penetration testing
🎯 Recommendation from the course: If your goal is a corporate Linux job, learn CentOS — it's the free replica of Red Hat Enterprise Linux, which dominates the corporate world.
A free, open-source hypervisor for x86 computers (developed by Oracle). It installs on top of your existing OS (Windows/Mac/Linux/Solaris) and lets you run multiple operating systems on the same hardware simultaneously.
Settings → Network → change NAT → Bridged Adapter (so the VM gets a real IP and internet access)
⚠️ Important: Always switch the network adapter to Bridged Adapter before installing — this lets the VM auto-detect your Wi-Fi/LAN and get online during setup.
ISO Image — download the image, attach it as a virtual disc via your server's console (Dell iDRAC, HP iLO, or a VM's virtual media) (method used in this course)
Network Boot (PXE) — common in large orgs installing hundreds of machines from a shared NFS/Samba server
💡 About 80% of the corporate world runs Red Hat Enterprise Linux, and CentOS is functionally identical to RHEL, but free. That's why the course installs CentOS (versions 7, 8, or 9 Stream — pick any; ~90% of commands transfer to other distros).
Search download CentOS <version> → go to centos.org → pick x86_64 → choose the mirror with the largest file (the full "everything" ISO, ~9–10 GB)
Create the VM in VirtualBox (see Section 10 settings above) and set network to Bridged Adapter
Attach the ISO: Start the VM → click the folder icon → Add → browse to your downloaded .iso → Choose → Start
Boot menu: use arrow keys (mouse won't work yet) → select "Install CentOS" → Enter
Tip: Right-Ctrl key releases a mouse trapped inside the VM window
Installation Wizard (GUI):
Screen
What to Do
Welcome
Choose language (e.g., English/United States) → Continue
Date & Time
Auto-detected to your region
Keyboard / Language Support
Auto-detected
Installation Source
Local media (already selected since ISO is attached)
Software Selection
"Server with GUI" (gives you a desktop, not just CLI)
Installation Destination
Select the disk (e.g., 20 GB) → Done
KDUMP
Leave enabled (captures kernel crash logs)
Network & Host Name
Set a host name (e.g., my-linux-vm) → Apply → toggle Ethernet ON → Done
Security Policy
Leave default
Root Password
Set a password for the root admin account (weak password warning is OK for a lab — click Done twice to confirm)
User Creation
Create a regular user (your name); optionally check "Make this user administrator"
Click Begin Installation → installs ~300+ packages (5–30 min depending on system speed)
Reboot → Accept license → Finish configuration
Log in as your regular user (or click "Not listed" to log in as root)
Right-click desktop → Open Terminal 🎉 — installation complete!
The install flow for CentOS 7, 8, 9 Stream, and Red Hat Enterprise Linux is nearly identical — the only visible difference is the logo, and whether you need a Red Hat subscription account to download the RHEL ISO.
💡 Take a snapshot right after your first successful install — if you break something a few weeks into the course, you can roll back instantly instead of reinstalling from scratch.
VM name, snapshot folder location, shared clipboard/drag-and-drop, description, encryption
System
RAM (base memory), boot order, # of CPUs/processors, hardware acceleration
Display
Video memory (affects resolution options), remote display
Storage
Attach/detach virtual disks, see allocated vs. actual disk size
Audio
Host audio driver
Network
Adapter type — NAT, Bridged, Host-only, Internal; add more adapters
USB
Pass through physical USB devices
Shared Folders
Share a host folder with the guest VM
Real-world scenario: A user says "my server needs more RAM/CPU/disk." On physical hardware, this means opening the case, buying/installing new components (sometimes impossible if slots are full). On a virtual machine, you just adjust the setting — often on the fly ("hot add").
A huge source of confusion for beginners — Linux uses the word "root" for three different things:
#
Term
What It Means
1
root account
The super-user username — most powerful account on the system (like Windows "Administrator")
2
root directory
/ — the very first / top-level directory in the file system
3
root's home directory
/root — the home folder belonging to the root user
⚠️ Don't confuse these! "Go to the root directory" means cd /. "Go to root's home directory" means cd /root. "Log in as root" means switching your user account, not navigating anywhere.
# Change YOUR OWN password (works for any logged-in user):passwd# As root, change a SPECIFIC user's password:passwd <username># example:passwd iafzal
Flow when you run passwd:
Prompts for your current/old password
Prompts for a new password
Prompts to retype the new password (to confirm no typos)
💡 Note the command is passwd — no "o" or "r" — it's p-a-s-s-w-d.
If your password is too short or matches a dictionary word, Linux will warn "password fails the dictionary check" — for a lab this is fine, just confirm by pressing through; in production, always pick a strong password.
Definition: A file system is how the OS organizes and manages files/directories, controlling how data is saved and retrieved from disk.
Analogy — a closet: 👔 Shirts on one shelf, pants on another, shoes in their own section. Without organization, everything gets thrown into one messy pile and you can't find anything. A file system keeps your OS's "closet" organized: config files in one folder, user files in another, logs in another, etc.
Windows — uses drive letters (C:\) and stores program files, user profiles, and OS config in separate top-level folders on that drive.
Linux — has one single hierarchical tree, starting at / (the root). Everything — including hardware devices — is represented as a file somewhere in that tree.
/ | +----------+----------+-----------+----------+----------+----------+ | | | | | | | /boot /root /etc /home /var /optbootloader root user's config regular logs 3rd-party/files home dir files users' (/var/log) add-on apps(grub.cfg) (system- home dirs wide) +----------+----------+-----------+----------+----------+----------+ | | | | | | |/bin,/sbin /lib /tmp /dev /proc /mediaeveryday+ shared temporary device running CD/DVDsystem library scratch files process mountcommands files files (disks, info (RAM point keyboard) only) Windows analogy: "/" is like C:\ -- everything hangs off one root, no drive letters. Note: /root != / (don't confuse the root user's home folder with the root of the filesystem) Tip: a directory listing (ls -l) shows a "d" at the very start of the line for folders.
Directory
Purpose
/boot
Bootloader files (e.g., grub.cfg) — used every time the system boots to decide which kernel/OS version to start
/root
The root user's home directory (⚠️ not the same as /)
/dev
Device files — disks, CD-ROM, speakers, flash drives, keyboards, etc. — every peripheral shows up as a file here
/etc
System-wide configuration files (DNS, sendmail, NTP, etc.) — always back up before editing!
Three essential commands — you cannot do anything in Linux without them:
Command
Stands For
Purpose
cd
Change Directory
Move into a different directory
pwd
Print Working Directory
Tells you where you currently are
ls
List
Lists contents of a directory
🖱️ Windows analogy: Double-clicking a folder icon in Windows Explorer secretly does three things at once — it changes into that directory (cd), lists its contents (ls), and shows you where you are in the address bar (pwd). In Linux, you run all three manually.
pwd # Where am I?cd / # Go to the root directoryls -l # List contents with detailscd boot # Go into the "boot" subdirectory (relative path)cd .. # Go UP one directorycd # No argument = go straight to YOUR home directorycd ~ # Same as above (tilde = home directory)cd - # Go to the PREVIOUS directory you were in
Example walk-through:
cd / # go to rootpwd # / <- confirms locationcd etc # relative move into /etccd sysconfig # relative move into /etc/sysconfigpwd # /etc/sysconfigcd .. # back up one level -> /etccd .. # back up again -> /
Just like right-clicking a file in Windows → Properties shows you size, type, dates, and permissions, Linux shows this via:
ls -l
Sample output breakdown:
drwxr-xr-x 2 root root 4096 Jan 10 09:15 Documents-rw-r--r-- 1 root root 512 Jan 10 09:20 notes.txt
Column
Meaning
1st character (d, -, l...)
File type — d = directory, - = regular file, l = link
Remaining 9 chars
Permissions (owner / group / other)
Number (e.g., 2)
Number of hard links
1st name (e.g., root)
Owner of the file
2nd name (e.g., root)
Group that owns the file
Number (e.g., 4096)
Size in bytes
Date/time
When it was created/modified
Last field
Name of the file or directory
ls -l # alphabetical listing with detailsls -ltr # sorted by time, oldest first, newest at the BOTTOM (very useful!)
💡 If you cd into something and get "Not a directory" — check with ls -l: if there's no d at the start of that line, it's a file, not a folder, and you can't cd into it.
ABSOLUTE PATH RELATIVE PATH --------------------------- --------------------------- always starts with / never starts with / $ cd /var/log/samba $ cd log $ cd samba Works from ANYWHERE -- you Depends on WHERE you don't need to already be in a currently are (pwd) -- particular folder. shorter, but position-based. Full route from the root "/" Relative to your current directory
Type
Starts With /?
Works From
Absolute path
✅ Yes
Anywhere — full route from /
Relative path
❌ No
Only relative to your current directory
# ABSOLUTE — works no matter where you currently are:cd /var/log/samba# RELATIVE — only works if you're already inside /var:cd logcd samba
⌨️ Pro tip: Press Tab while typing a path to auto-complete the directory/file name if it exists.
🔒 Permissions matter! If you try to create a file in a directory you don't own (e.g., /etc as a regular user), you'll get "Permission denied" — only root (or the file/directory owner) can write there.
# search starting at current directory (.) for a file named "Kramer":find . -name "Kramer"# search the ENTIRE system starting from root:find / -name "enp0s3.nmconnection"
You'll often need to su - to root first — otherwise you'll get a wall of Permission denied errors for directories you can't read.
If locate returns nothing (because the file is new and the database hasn't caught up), refresh the database as root:
su -updatedb
Check/install the required package (mlocate) if locate isn't available:
rpm -qa | grep mlocate # check if it's installeddnf install mlocate # install it if missing (as root)
💡 Interview tip: If asked "where's this config file located?" it's perfectly fine to say "I'd run find or locate to check" — you don't need to memorize every file path.
# Create 9 files at once using brace expansion:touch abcd{1..9}-xyz# creates: abcd1-xyz, abcd2-xyz, ... abcd9-xyz# List every file starting with "abc":ls -l abc*# Delete every file starting with "abc":rm abc*# Delete every file ENDING in "xyz":rm *xyz# Match ANY single first character, followed by "bcd" + anything:ls -l ?bcd*# Match any file containing "A" OR "B" in the name:ls -l [AB]*# Delete any file that has "XY" together in the name:rm *XY*
⚠️ Wildcards work with any command — ls, rm, cp, etc. Always double-check with ls before running rm with a wildcard — deletions are permanent!
First, understand the inode: every file on disk is tracked by the OS using a number called an inode — the name (e.g., hulk) is just a human-friendly label; the OS actually tracks the file by its inode number.
SOFT LINK (ln -s) HARD LINK (ln) ------------------- ------------------- [ link file ] [ hulk (file) ] [ link file ] | \ / | (points to name) \ / v v v [ hulk (file) ] [ SAME inode (data) ] | | (points to data) v [ inode (data) ] If "hulk" is deleted, If "hulk" is deleted, the link BREAKS (x) the link STILL WORKS (v)
# Create a source file:touch hulkecho "Hulk is a superhero" > hulk# --- SOFT LINK ---cd /tmpln -s /home/iafzal/hulk hulk # create the soft linkls -ltr # notice the "l" type + arrow (hulk -> /home/iafzal/hulk)cat hulk # reads through to the source content# Delete the SOURCE file:cd /home/iafzalrm hulkcd /tmpcat hulk # "No such file or directory" -- soft link is now BROKEN# --- HARD LINK ---cd /home/iafzaltouch hulkecho "Hulk is a superhero" > hulkcd /tmpln /home/iafzal/hulk hulk # create the hard link (no -s !)cat hulk # same content# Delete the SOURCE file again:cd /home/iafzalrm hulkcd /tmpcat hulk # STILL WORKS -- hard link kept the data alive!
pwd # print working directorycd /path # absolute pathcd relative/path # relative pathcd .. # up one levelcd ~ | cd # go homecd - # go to previous directoryls / ls -l / ls -ltr
📝 Homework from the instructor: Log into your Linux VM, run cd / then ls -l, and manually explore every top-level directory — go in, list its contents, come back out — until navigating the file system feels natural.
Guide compiled from the full course transcript — "Complete Linux Training Course to Get Your Dream IT Job" by Imran Afzal.