IT Course Directory: VMware, Linux, Networking, and Raspberry Pi
Free Linux Course: From Command Line Fundamentals to System Administration
Learn Linux from the beginning with practical lessons on Bash, files, permissions, processes, packages, networking, storage, logging, scheduling, and shell scripting.
This free Linux course takes you from your first terminal session to practical system administration. You will learn how Linux is structured, how to manage files and users, how to diagnose networks and storage, and how to automate routine work with Bash.
No previous command-line or programming experience is required. You should be comfortable using a computer and installing software, or be able to use a supplied virtual machine. All potentially destructive exercises should be performed in a disposable virtual machine, test disk, or backed-up system.
Course outcomes
- Explain the Linux kernel, user space, distributions, GNU tools, and the Filesystem Hierarchy Standard.
- Install a Debian-family desktop system or an RPM-family server system in a virtual machine.
- Use Bash, command history, help systems, paths, variables, quoting, redirection, and pipelines.
- Manage files, links, text, processes, packages, users, groups, permissions, services, and logs.
- Inspect and configure basic networking, storage, mounts, swap, filesystems, and quotas.
- Write safe introductory shell scripts and combine Linux utilities into repeatable administration tasks.
Module 1: Linux foundations
Linux, GNU, Unix, and Windows
Linux is an open-source operating system ecosystem built around the Linux kernel. The kernel is the privileged software that manages hardware resources, memory, processes, devices, networking, and system calls. A complete usable system also includes user-space libraries, utilities, services, shells, desktop software, and package repositories. Many core command-line programs come from the GNU project, so a typical system is often described as GNU/Linux.
Unix is a family of operating systems and design traditions. Linux is not Unix source code, but it follows many Unix ideas: small composable programs, a hierarchical filesystem, devices represented through files, users and groups, permissions, and powerful text interfaces. Unix systems influenced Linux, while Linux was developed independently and distributed under open-source licenses.
| Aspect | Linux | Unix | Windows |
|---|---|---|---|
| Interface | Shells and many desktop environments | Shells and vendor-specific desktops | Graphical desktop and PowerShell or Command Prompt |
| Software installation | Distribution repositories and package managers | Vendor tools, ports, or source builds | Installers, Microsoft Store, and package tools |
| Paths | One tree rooted at /; forward slashes | One tree rooted at / | Drive letters such as C:\ |
| Permissions | Users, groups, mode bits, ACLs, and attributes | Similar Unix permission model | NTFS ACLs and accounts |
| Administration | Root account, sudo, services, and configuration files | Root and vendor-specific administration | Administrator accounts, services, and policy tools |
Distributions and user space
A distribution combines the kernel with an installer, package repositories, libraries, utilities, documentation, a default desktop or server configuration, and update policies. Debian and Ubuntu use the Debian package ecosystem and dpkg/APT. Fedora, Rocky Linux, CentOS Stream, and similar systems use RPM packages and DNF; older material may refer to YUM. Choose a distribution with good hardware support, documentation, a suitable release lifecycle, and packages appropriate to your goal. Desktop distributions emphasize graphical applications; server installations commonly use fewer services and may be administered remotely.
The directory tree and FHS
Linux presents files through one directory tree. The Filesystem Hierarchy Standard (FHS) describes conventional locations, although exact contents vary by distribution and some modern systems merge paths such as /bin into /usr/bin.
| Directory | Primary purpose | Typical contents | Administration notes |
|---|---|---|---|
/ | Filesystem root | Top-level directories | Do not confuse it with the root user |
/bin | Essential user commands | sh, ls, and compatibility links | Often merged into /usr/bin |
/etc | Host-specific configuration | Users, services, networking | Back up before major changes |
/home | User home directories | Documents and personal configuration | Usually separate from system data |
/usr | Most user-space programs and data | Applications, libraries, documentation | Normally managed by packages |
/var | Changing application and system data | Logs, caches, queues, databases | Monitor capacity |
/tmp | Temporary files | Short-lived working data | May be cleared during boot |
/dev | Device interfaces | Disks, terminals, random devices | Never delete devices casually |
/proc | Kernel and process information | CPU, memory, process directories | Virtual filesystem, not ordinary disk data |
/mnt | Temporary mount location | Mounted test filesystems | Use deliberate mount points |
Module 2: Installation and first login
Safe practice begins with isolation. A virtual machine is the best starting point because it provides snapshots, virtual disks, and a controlled network. Dual boot gives native performance but requires careful partitioning and backups. Dedicated hardware is appropriate when you understand firmware, storage, drivers, and recovery procedures.
BIOS or UEFI firmware initializes hardware and selects a boot device according to boot order. An installer image must be written as bootable media rather than copied as an ordinary file. In a virtual machine, attach the ISO to the virtual optical drive and confirm that the VM boots from it. In physical hardware, use the firmware boot menu and verify the installation target before formatting.
Install a Debian-family desktop distribution such as Ubuntu in a virtual machine, create a normal user, select a timezone and keyboard layout, and choose guided partitioning for a disposable practice system. For an RPM-family server distribution in VMware Player or another virtualization platform, allocate suitable CPU, memory, storage, and networking, then choose a minimal or server profile and create a non-root administrator.
After first login, open a terminal and check the account, shell, kernel, distribution, network, storage, and updates:
whoami
printf '%s\n' "$SHELL"
uname -r
cat /etc/os-release
pwd
ip address
lsblk
sudo apt updateOn an RPM-family system, use the corresponding repository refresh command such as sudo dnf makecache. Confirm that the clock, hostname, network connection, user home directory, package manager, and available disk space are sensible before beginning exercises.
Module 3: Bash and command-line essentials
A shell reads a command line, expands variables and globs, handles quoting, searches PATH, starts programs, connects input and output, and reports an exit status. Bash is a widely used shell. A terminal is the application or connection through which a shell session is displayed.
A command normally has this anatomy: command options arguments. Options change behavior, arguments identify objects, and a path may be absolute, such as /var/log/syslog, or relative to the current directory, such as notes/today.txt. Use single quotes to preserve literal text, double quotes to allow variable expansion, and a backslash to escape one character.
| Command | Purpose | Common options | Example use | Safety notes |
|---|---|---|---|---|
pwd | Print current directory | None usually needed | pwd | Confirm location before changes |
cd | Change directory | .., -, ~ | cd ~/projects | Use pwd when unsure |
ls | List directory entries | -l, -a, -h | ls -la | Hidden entries begin with a dot |
mkdir | Create directories | -p | mkdir -p project/src | Check the path first |
rmdir | Remove empty directories | None usually needed | rmdir old | Only removes empty directories |
touch | Create or timestamp a file | None usually needed | touch todo.txt | Existing file timestamps can change |
cp | Copy files or directories | -i, -r, -a | cp -i file backup/ | Recursive copying needs a precise target |
mv | Move or rename | -i | mv -i draft final | Can overwrite depending on options and aliases |
rm | Remove entries | -i, -r | rm -i temporary | No normal recycle bin; avoid unreviewed -rf |
Use history to review commands. The shell may support history expansion such as !! and !42; review recalled commands before execution, especially when they contain sudo or deletion. Get help with man command, command --help, Bash help builtin, apropos keyword, and info command.
Shell variables exist in the current shell. export NAME=value marks one for inheritance by child processes. Common variables include HOME, USER, SHELL, PWD, LANG, and PATH. Startup files such as ~/.bashrc and login files such as ~/.profile can make settings persistent. PATH is a colon-separated search list; use command -v name or type name to discover what will run. Do not add the current directory to PATH casually.
Module 4: Files, links, streams, and text
An inode stores a file's metadata and references to its data. A directory entry maps a filename to an inode, so a filename is not the same thing as the underlying file. Metadata includes ownership, permissions, timestamps, size, and link count.
| Characteristic | Hard link | Symbolic link |
|---|---|---|
| What it stores | Another directory entry for the same inode | A separate file containing a target path |
| Across filesystems | Normally not permitted | Usually permitted |
| Directories | Normally not created by users | Can point to directories |
| After original name removal | Still accesses the data | May become broken |
| Typical use | Additional name for the same data | Aliases, relocatable paths, and selected versions |
ln report.txt report.hard
ln -s report.txt report.link
ls -li report.txt report.hard report.linkGlobs are expanded by the shell before a command runs: * matches any string, ? matches one character, and [abc] or [0-9] matches a character class. If no match should be acted on, test expansion with printf '%s\n' pattern. Quote variable expansions and use -- before names that could begin with a hyphen.
Every process conventionally has standard input (file descriptor 0), standard output (1), and standard error (2).
| Operator | Meaning | Example | Common pitfall |
|---|---|---|---|
> | Replace standard output | date > run.log | Overwrites an existing file |
>> | Append standard output | date >> run.log | Can grow without a retention policy |
2> | Redirect standard error | cmd 2> errors.log | Does not capture normal output |
&> | Redirect output and errors in Bash | cmd &> all.log | Syntax differs among shells |
| | Send output to another command | grep FAIL app.log | sort | uniq -c | Inspect pipeline exit behavior |
Compose small tools with pipelines. Useful filters include grep, sort, uniq, wc, cut, paste, join, tr, fmt, nl, od, pr, sed, and awk. Use grep -E for extended regular expressions, grep -R for recursive search, and remember that a successful match commonly returns status 0 while no match returns 1.
grep -R 'failed' /var/log 2>/dev/null | sort | uniq -c | sort -nr
find ~/projects -type f -size +100M -print
find . -type f -mtime -2 -name '*.log' -print
wc -l words.txt
head -n 10 data.txt
tail -f application.log
less large-file.txt
split -l 1000 records.txt part-
file unknown.bin
command -v bash
whereis bash
locate report.txtfind searches the current filesystem using predicates such as name, type, time, and size, and can perform actions. locate is faster because it searches a database that may be stale; refresh that database with updatedb when permitted. Use less to inspect rather than edit. A graphical editor such as gedit or KWrite is convenient for desktop work; nano or pico is suitable in a terminal. When editing protected configuration, make a backup, inspect the file, use sudo only for the editor operation that needs it, and validate syntax afterward.
Module 5: Processes and job management
A process is a running program with a process identifier (PID), state, open files, environment, and resource usage. Processes form parent-child relationships. Inspect them with ps, search by name with pgrep, and monitor interactively with top or an available modern alternative.
ps aux
pgrep -a bash
long-command &
jobs
fg %1
# Ctrl+Z pauses a foreground job
bg %1
disown %1
kill -TERM PID
kill -KILL PIDPrefer a graceful signal such as TERM before KILL. pkill and killall can affect multiple processes, so use exact names or additional criteria. CPU priority is influenced by the nice value: start with nice -n 10 command or adjust a running process with renice. Foreground and background execution, Ctrl+C, Ctrl+Z, jobs, fg, bg, and disown are Bash job-control features.
Module 6: Software, packages, and archives
A package manager obtains signed package metadata from repositories, resolves dependencies, installs files, records ownership, and supports updates and removal. Refresh metadata before installing and apply updates regularly. Avoid mixing repositories built for different distributions or releases.
| Task | Debian/Ubuntu tools | RPM-family tools | Notes |
|---|---|---|---|
| Refresh metadata | apt update | dnf makecache | Does not itself upgrade packages |
| Install | apt install name | dnf install name | Usually requires administrative rights |
| Search | apt search name, apt-cache search | dnf search name | Search metadata and descriptions |
| Remove | apt remove name | dnf remove name | Review dependent packages |
| Query a local package | dpkg -s name | rpm -q name | Local database query |
| Find provider of a file | dpkg -S /path/file | rpm -qf /path/file | Some provider searches require repository metadata |
apt-get is useful in scripts, while apt is designed for interactive use. apt-cache queries metadata. dselect, aptitude, and Synaptic are older or alternate interfaces; they may still be useful, but modern systems commonly use APT commands. RPM-family systems historically used YUM; DNF is its current successor. dpkg and rpm operate on individual package files and do not replace repository dependency resolution.
Use tar and cpio for archives. A package format is not the same as a general archive. Conversion tools can produce an apparently installable package with incorrect dependency metadata, paths, scripts, or ownership; prefer a package built for the target distribution.
tar -czf home-backup.tar.gz ~/project
tar -tzf home-backup.tar.gz
tar -xzf home-backup.tar.gz -C /tmp/test-restoreModule 7: Users, groups, ownership, and permissions
The root account has unrestricted administrative power. Use a normal account and sudo for individual commands, following least privilege. A UID identifies a user and a GID identifies a group. Users have a primary group and may have supplementary groups.
| File | Purpose | Access restrictions | Key fields |
|---|---|---|---|
/etc/passwd | Local account database | Generally readable; password hashes are not stored here | Name, placeholder, UID, GID, comment, home, login shell |
/etc/shadow | Password hashes and aging data | Restricted to root or privileged readers | Hash, last change, minimum, maximum, warning, expiry |
/etc/group | Local group database | Generally readable | Group name, placeholder, GID, supplementary members |
sudo useradd -m -s /bin/bash learner
sudo passwd learner
sudo groupadd project
sudo usermod -aG project learner
id learner
sudo chown learner:project project-file
sudo chmod 640 project-file
umask 027Use adduser when a distribution provides its interactive helper. userdel, usermod, passwd, chage, groupmod, groupdel, and gpasswd manage account and group state. Account locking, password aging, and secure credential handling are part of routine administration. /etc/skel supplies default files for new home directories, while shell startup files customize environments.
| Permission | Symbolic value | Numeric value | Effect on file | Effect on directory |
|---|---|---|---|---|
| Read | r | 4 | Read contents | List names |
| Write | w | 2 | Change contents | Create, remove, or rename entries |
| Execute | x | 1 | Run as a program when applicable | Traverse or access entries by name |
Permissions are shown for user, group, and others in ls -l. A mode such as 640 means owner read/write, group read, and no access for others. Symbolic forms include u+x, g-w, and o-r. umask removes default permission bits from newly created files and directories. Ownership is changed with chown and chgrp. Extended attributes can be inspected with lsattr and changed with chattr where supported; immutable and append-only attributes can block ordinary administrative operations.
Module 8: Hardware, kernel, boot, and services
/proc, or procfs, exposes live kernel and process information. Inspect CPU and kernel details with cat /proc/cpuinfo, lscpu, and uname. Hardware may use IRQs for interrupts, I/O ports for device communication, and DMA for transferring data with limited CPU involvement. Kernel modules extend the running kernel; inspect them with lsmod, load dependencies with modprobe, load a specific module with insmod, and remove modules with rmmod or modprobe -r. Inspect USB devices with lsusb.
The boot sequence generally proceeds from BIOS/UEFI firmware to a boot loader, then the kernel and initramfs, the init system, services, and a login screen or prompt. GRUB 2 is common on current Linux systems; GRUB Legacy and other boot loaders are important for understanding older installations. Use distribution configuration tools rather than manually editing generated GRUB files. Review kernel and hardware messages with dmesg.
SysV init used runlevels and commonly stored configuration in /etc/inittab. Modern distributions usually use systemd targets instead. Learn the concept retained by both systems—an operational state with services—while using systemctl and journalctl on current systems. Change states carefully, especially on remote hosts.
systemctl status ssh
systemctl enable --now service-name
systemctl get-default
journalctl -b -p warningModule 9: Networking
An IPv4 address identifies a Layer 3 interface. A prefix or subnet mask divides network and host portions; a gateway forwards traffic beyond the local subnet. Private ranges include 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. A MAC address identifies a Layer 2 interface on a local network. DHCP leases address, prefix, gateway, and often DNS information. DNS maps names to records through resolvers; /etc/hosts provides local static mappings, and the hostname identifies the system.
ip address
ip route
hostnamectl
cat /etc/hosts
cat /etc/resolv.conf
ping -c 4 1.1.1.1
ping -c 4 example.invalid
host example.com
dig example.com
ss -tulpen
sudo tcpdump -i any port 53| Tool | Question answered | Example | Modern or security considerations |
|---|---|---|---|
ip | What interfaces and routes exist? | ip route | Preferred over ifconfig |
ping | Does an endpoint respond to ICMP? | ping -c 4 host | Firewalls may block it |
tracepath/traceroute | What path do packets take? | tracepath host | Results vary by filtering and protocol |
host, dig, nslookup | What does DNS return? | dig A example.com | Compare resolver and authoritative answers |
ss | What connections and listening ports exist? | ss -tulpen | Preferred over legacy netstat |
tcpdump | What packets are visible? | sudo tcpdump -i eth0 | Capture only authorized traffic |
whois | What registration data is published? | whois domain | Availability and output vary by registry |
Configure a test machine with DHCP or a static address using the distribution's current method: Netplan on many Ubuntu installations and NetworkManager tools or profiles on many RPM-family systems. Validate addresses, routes, DNS, and hostname after a change. IP forwarding is different from ordinary host routing: host routing selects where this machine's own packets go, while forwarding allows the kernel to route packets arriving on one interface toward another and normally requires deliberate firewall and policy configuration.
Module 10: Filesystems, disks, mounts, and quotas
A filesystem organizes blocks and metadata; a superblock describes important filesystem parameters. A partition is a region described by a partition table, while a filesystem is created inside a partition or other block device. ext2, ext3, and ext4 are related Linux filesystems. XFS is widely used for scalable filesystems. ReiserFS and JFS are mainly historical choices. FAT and NTFS support interoperability with Windows, and ISO-9660 is common for optical-disc images.
| Type | Category | Typical use | Compatibility | Notes |
|---|---|---|---|---|
| ext4 | Linux filesystem | General-purpose Linux installations | Strong Linux support | Journaling filesystem |
| XFS | Linux filesystem | Large files and filesystems | Linux-focused | Common in enterprise systems |
| FAT | Interoperability | Removable media and firmware partitions | Broad | Limited Unix permission semantics |
| NTFS | Interoperability | Windows volumes | Linux support available | Check driver and write-support details |
| ISO-9660 | Optical image | CD/DVD images | Broad read support | Usually read-only |
MBR is an older partition-table format with practical partition and disk limits; GPT is the modern choice and works naturally with UEFI. Use lsblk and blkid to identify devices, then use fdisk or GNU parted only on a disposable disk. Create a filesystem with a suitable mkfs command, create swap with mkswap, and activate it with swapon.
lsblk -f
sudo blkid
sudo mount /dev/sdX1 /mnt/test
findmnt /mnt/test
sudo umount /mnt/test
df -h
du -sh /var/*Persistent mounts belong in /etc/fstab. Prefer a filesystem UUID or stable label over a changing device name, select mount options deliberately, and validate before rebooting:
UUID=replace-with-real-uuid /srv/data ext4 defaults 0 2
sudo mount -a
findmnt /srv/dataSafely unmount USB storage before removal. Use df for filesystem capacity and du for directory consumption. Run fsck and filesystem-specific tools such as tune2fs, dumpe2fs, or debugfs only with a recovery plan; never repair a mounted writable filesystem unless the tool and situation explicitly support it. Quotas limit user or group consumption; typical tools include quota, edquota, and repquota.
Module 11: Logging, time, scheduling, and email
Syslog organizes events by facility and priority and routes them according to configuration. syslogd and rsyslog are common implementations; systemd-based systems also provide the journal. Use logger to create a test entry and inspect the applicable journal or distribution-specific file, such as /var/log/messages or another file under /var/log. Log rotation controls size, retention, compression, and deletion.
logger -t course-demo 'test event'
journalctl -t course-demo
sudo logrotate -d /etc/logrotate.conf| Tool | Scheduling model | Best use case | Persistence and availability behavior |
|---|---|---|---|
cron/crontab | Recurring calendar times | Regular jobs on running systems | Use absolute paths and capture output |
anacron | Periodic jobs without exact times | Systems that may be powered off | Runs missed periodic work when available |
at | One-time future execution | Temporary scheduled actions | Requires the service and permission policy |
| systemd timers | Calendar or elapsed-time triggers | Managed modern services | Integrates with units and journal |
A user crontab has a smaller environment than an interactive shell. Set required variables, use absolute command paths, redirect both output streams, and inspect logs when a job fails. Use date, hwclock, and timedatectl to inspect time. NTP synchronizes clocks using a time service; clients may use chronyd or ntpd, while an NTP server provides time to clients. SMTP transfers mail, IMAP synchronizes messages while retaining them on a server, and POP3 generally downloads messages. A mail transfer agent sends mail; a mail client reads or composes it. Scheduled output can be mailed when local mail delivery and a mail command are configured.
Module 12: Shell scripting and administration utilities
A shell script is a text file containing commands. A shebang selects its interpreter, executable permission allows direct invocation, and a safe layout separates input, validation, work, and reporting.
#!/usr/bin/env bash
set -u
threshold=80
used=$(df -P / | awk 'NR==2 {gsub(/%/, "", $5); print $5}')
if [ "$used" -ge "$threshold" ]; then
printf 'Warning: root usage is %s%%\n' "$used" >&2
exit 2
fi
printf 'Root usage is %s%%\n' "$used"
exit 0Practice variables, quoting, command substitution, positional arguments, exit statuses, and basic error handling. Use if with test expressions, case for multi-branch choices, and for, while, or until for iteration. Validate input before using it in filenames or commands. Learn aliases for interactive convenience, but use functions or scripts for reusable administration.
Administration practice also combines type, command -v, time, od, nl, tr, fmt, pr, split, join, paste, uniq, sed, and awk. Archive filesystems with tar while preserving permissions and metadata, then restore into a test location before trusting the backup. Current shutdown operations include systemctl reboot, systemctl poweroff, and systemctl halt; use them only when you understand who will be disconnected.
Troubleshooting playbook
- Command not found: check spelling and package installation, inspect
PATH, and usetype,command -v, andwhereisto distinguish aliases, built-ins, functions, and executables. - Permission denied: inspect every directory in the path, ownership, group membership, permission bits, ACLs, and extended attributes. Directory execute permission means traversal; use
sudoonly when needed. - Broken symbolic link: inspect the target with
readlinkorls -l, and determine whether a relative target was resolved from the link's directory. - Process will not stop: verify the PID, try
TERMbeforeKILL, inspect the process state and parent, and remember that uninterruptible sleep may delay signals. - Package failure: refresh metadata, test network and DNS, inspect dependency or held-package messages, and confirm repository compatibility with the distribution release.
- Boot or mount failure: use a snapshot or backup, verify UUIDs and options in
/etc/fstab, inspect emergency-mode messages anddmesg, and never repair a mounted writable filesystem casually. - Network works by IP but not name: inspect resolver settings, test with
digorhost, check/etc/hosts, gateway reachability, and DNS server access. - Cron job fails: use absolute paths, define its environment, verify syntax and service state, and redirect standard output and error to a log.
- Disk is full: compare
dfwithdu, check deleted-but-open files and inode exhaustion, and inspect logs, caches, and temporary data before deleting anything.
Applied practice and knowledge checks
- Install Ubuntu in a virtual machine, create a non-root user, open a terminal, and verify the distribution, kernel, shell, and current directory.
- Navigate
/etc,/var,/home,/proc, and/dev; explain what each contains and whether it is persistent disk data. - Create a project tree, copy and rename files, test glob expansion, and safely delete a temporary directory.
- Create hard and symbolic links, compare inode numbers, remove the original filename, and explain the different results.
- Filter a log for failures, sort and deduplicate records, count results, and save standard output and errors separately.
- Run a long task in the background, inspect it with
psandtop, adjust its priority, and terminate it gracefully. - Install, query, update, and remove a package with APT, then map each task to RPM, YUM, and DNF concepts.
- Create a project user and group, assign supplementary membership, configure a shared directory, and verify ownership and modes.
- Inspect modules, CPU and USB hardware, kernel messages, interfaces, routes, DNS, and listening ports.
- On a disposable virtual disk, create a GPT partition, format ext4, mount by UUID, validate
/etc/fstab, measure usage, and perform a read-only inspection workflow. - Create a scheduled disk-space report, log an application event with
logger, and diagnose the job if it does not run. - Write a Bash script that checks free space, loops through selected directories, reports a threshold breach, and returns meaningful exit codes.
Finish each module with a quiz covering command syntax, output interpretation, administration concepts, and safety decisions. The cumulative assessment should combine files, permissions, processes, packages, networking, storage, logs, scheduling, archives, and scripting in one controlled practice system.
Next learning paths
After completing this curriculum, continue with Linux practice activities. Related study areas include Apache administration, MySQL, network discovery, log analysis, virtualization, SSH, security hardening, containers, cloud administration, configuration management, and Linux certification preparation.