Linux online course

Linux Administration Course: Installation, Shell, Storage, Networking, and Permissions

Learn Linux administration from installation and desktop use to shell commands, storage, networking, permissions, services, and troubleshooting.

Linux Administration Course Overview

This course introduces Linux administration for personal computers, virtual machines, workstations, and servers. You will learn how to install a Linux distribution, use its graphical desktop, work in a shell, manage files and software, control permissions, administer storage and networking, and diagnose common system problems.

You need only basic computer literacy: understanding files, folders, applications, and simple settings. Practice on a virtual machine or spare computer whenever a command could alter disks, users, services, or system configuration.

1. Linux Foundations

Linux is an operating-system ecosystem centered on the Linux kernel. The kernel is the core component that manages hardware, memory, processes, device access, and other low-level functions. A complete usable system combines the kernel with utilities, libraries, software, configuration, and often a graphical desktop.

Linux is used on desktops and laptops, web and database servers, embedded devices, routers, appliances, mobile-oriented platforms, scientific systems, supercomputers, and large-scale cloud infrastructure. The same kernel family can support very different systems because distributions select and integrate different software.

How the parts fit together

  • Kernel: communicates with hardware and provides core operating-system services.
  • Distribution: a packaged Linux system containing the kernel, installer, repositories, utilities, update system, and possibly a desktop environment.
  • Desktop environment: the graphical workspace, including panels, menus, windows, settings, and graphical applications.
  • Shell: a command interpreter that accepts commands and can automate tasks.
  • Applications: programs such as browsers, editors, media players, databases, and web servers.
  • System utilities: tools for networking, storage, users, services, logs, and package management.

Common distribution families include Debian-based systems, Red Hat-based systems, SUSE-based systems, and Arch-based systems. Families may use different package formats, commands, configuration conventions, release schedules, and support models. The administration concepts remain similar even when the commands differ.

Distribution familyTypical package formatCommon package commandsTypical use case
Debian family.debaptBeginner desktops, servers, broad documentation
Red Hat family.rpmdnf, sometimes yumServers, enterprise environments, workstations
SUSE family.rpmzypperEnterprise and general-purpose systems
Arch familyDistribution-specific packagespacmanUsers who want current software and detailed control

2. Preparing to Install Linux

Choose a distribution

For a first installation, choose a distribution with good hardware support, clear community documentation, a stable release model, and a large package ecosystem. A mainstream beginner-oriented distribution with a graphical installer is usually easier than a highly customized or minimal distribution. Also consider whether you need long-term support, newer hardware drivers, a particular desktop environment, or compatibility with software used by your organization.

Choose an installation method

  • Physical hardware: provides direct access to the computer's devices and performance, but partitioning or replacing an existing operating system can affect data.
  • Virtual machine: is safer for learning because the virtual disk can be backed up, reset, or deleted. It may have limited graphics, memory, or device access.
  • Cloud or remote server: is useful for server practice and usually starts from a provider image. You must plan remote access, credentials, firewall rules, backups, and recovery access.

Obtain and verify installation media

Download an installation image from the distribution's official distribution channel. Verify its checksum against the published checksum, or verify a digital signature when the project provides one. A checksum confirms that the file matches the expected content; a signature also helps establish that the checksum came from a trusted publisher.

sha256sum linux-installer.iso

Compare the displayed value exactly with the expected SHA-256 value. Do not use an image whose verification fails.

Create bootable media

Use a trusted image-writing tool to write the image to a USB device. Writing an image normally erases the selected USB device, so identify the target carefully. On physical hardware, open the firmware boot menu or adjust the boot order when the computer does not start from USB. Firmware settings may include UEFI, Secure Boot, storage-controller modes, and virtualization support.

Back up before changing disks

Back up documents, browser data, keys, and any configuration you need. Confirm that the backup can be opened. Replacing an operating system, deleting partitions, or selecting an entire disk for automatic installation can destroy existing data. Dual booting adds complexity: reserve unallocated space, keep recovery media, avoid shrinking a mounted or encrypted volume casually, and understand which bootloader controls startup.

3. Linux Installation Workflow

Installers differ visually, but their decisions are broadly similar:

  1. Select language, region, and keyboard layout.
  2. Connect to a network if practical so the installer can obtain updates.
  3. Choose a time zone and time settings.
  4. Create a normal user account and a strong password. Some installers also configure administrative access through sudo.
  5. Select the disk and installation type.
  6. Choose software or package groups, such as a desktop, office tools, or a minimal server set.
  7. Confirm the bootloader location and review the final disk summary.
  8. Install, reboot, remove the installation media, and sign in.

Automatic and manual partitioning

Automatic partitioning lets the installer choose a practical layout. It is usually best for a new learner using a dedicated virtual disk or empty computer. Manual partitioning gives control over partitions, encryption, filesystems, and mount points, but an incorrect selection can erase another system.

  • /, called the root filesystem, contains the main system tree.
  • /home contains users' personal files and settings. A separate /home filesystem can simplify some reinstallations, but it does not replace backups.
  • /boot may contain boot files. Its exact layout depends on firmware and distribution choices.
  • Swap is disk space used for memory management and, on some systems, hibernation. It may be a partition or a swap file.

After first boot, apply updates, install required drivers through trusted tools, check display, audio, storage, network, suspend, and external devices, and confirm that the system starts normally after another reboot.

4. Using the Graphical Desktop

A desktop environment commonly includes an application launcher, a panel or taskbar, a settings application, a file manager, notifications, a network tool, and a terminal emulator. Names and placement vary between desktop environments, but the underlying concepts are similar.

  • Use the file manager to browse folders, copy or move items, connect to removable media, and inspect properties.
  • Use settings to configure displays, keyboard layouts, users, privacy, power, printers, and network connections.
  • Use the software tool to search for applications, install updates, and remove packages from configured repositories.
  • Use the terminal emulator when you need repeatable commands, detailed output, remote administration, automation, or access to options not exposed graphically.

Graphical tools are convenient for discovery and one-off user tasks. Terminal tools are often preferable for repeatable administration, troubleshooting, servers without displays, and operations that need a precise record. They are complementary approaches, not competing systems.

5. Terminal and Shell Fundamentals

A terminal emulator is a graphical program that provides a text interface. It starts a shell, which interprets commands. A prompt may show your username, computer name, and current directory.

Most commands follow this pattern:

command [options] [arguments]

Options change behavior, while arguments identify files, directories, or other targets. Spaces separate words. Quoting preserves spaces or special characters.

echo 'Project notes' > notes.txt
ls -l "Project Files"

Wildcards, also called globbing, are expanded by the shell. * matches zero or more characters, ? matches one character, and bracket expressions match selected characters. Always inspect a wildcard expansion before a destructive command.

printf '%s\n' ./*.log
ls -ld -- ./old-*

Absolute paths begin at /, such as /home/alex/docs. Relative paths begin at the current working directory, such as docs/report.txt. The current directory is ., the parent is .., and ~ means the current user's home directory.

CommandPurposeCommon optionsExample taskSafety note
pwdPrint current directoryNone commonly neededpwdSafe
lsList directory contents-l, -a, -hls -lahInspect hidden files with -a
cdChange directory-, ~cd ~/DocumentsUse pwd to confirm location
mkdirCreate directories-pmkdir -p project/srcConfirm the path before creating
cpCopy files or directories-i, -r, -acp -i report.txt backup/Use -i before overwriting
mvMove or rename-imv -i draft.txt final.txtCan overwrite a destination
rmRemove files-i, -rrm -i sample.txtNo normal recycle bin; avoid broad wildcards
findSearch by name and properties-name, -type, -sizefind . -type f -name '*.log'Test searches before adding actions
grepSearch text-i, -n, -rgrep -n 'error' app.logQuote patterns when needed
lessRead text interactivelyNone commonly neededless /var/log/syslogRead-only

Input, output, errors, and pipelines

Commands conventionally use standard input for incoming data, standard output for normal results, and standard error for diagnostic messages. A pipe sends one command's standard output to another command's standard input.

ls -l | less
cat app.log | grep -i error
command > result.txt
command >> result.txt
command < input.txt
command 2> errors.txt
command1 && command2

> replaces a file, while >> appends. 2> redirects standard error. && runs the second command only if the first succeeds. Use history to review previous commands and the shell's arrow keys to recall them.

Documentation

man ls
ls --help
help cd
command --help

Manual pages are organized by sections and usually include synopsis, options, examples, and related commands. Read documentation before using an unfamiliar administrative option.

6. Filesystem and File Management

Linux presents hardware and many system interfaces through a single hierarchical tree beginning at /. Important directories include:

DirectoryPrimary purposeCommon contentsAdministrative cautions
/Top of the filesystem treeAll major directoriesChanges affect the entire system
/homePersonal user dataUser directories and settingsProtect privacy and backups
/etcSystem configurationService and account configurationBack up before editing
/varChanging system dataLogs, caches, queues, databasesCan fill a filesystem
/usrInstalled programs and shared dataBinaries, libraries, documentationPrefer package management over manual deletion
/tmpTemporary dataShort-lived application filesContents may be cleaned automatically
/devDevice interfacesDisk, terminal, and device nodesWriting to the wrong device can destroy data
/procKernel and process informationVirtual status filesNot ordinary persistent storage
/mntCommon temporary mount locationMounted disks and filesystemsUnmount before disconnecting media

Useful file operations include:

mkdir -p ~/course/project
cd ~/course/project
touch notes.txt
cp notes.txt notes-copy.txt
mv notes-copy.txt archive.txt
find ~/course -type f -name '*.txt'
head -n 5 archive.txt
tail -f application.log

Use a terminal editor such as nano for basic text changes: nano filename. Learn how to save and exit before editing important configuration. For larger changes, make a backup and change one setting at a time.

Archives combine files; compression reduces their size. A common administration pattern is:

tar -czf project.tar.gz project/
tar -tzf project.tar.gz
tar -xzf project.tar.gz

The first command creates a gzip-compressed archive, the second lists its contents, and the third extracts it. Use unzip for ZIP archives and avoid extracting untrusted archives into sensitive directories.

7. Software and Package Management

A package is a managed unit of software and metadata. Metadata can include the version, dependencies, description, files, and signing information. A repository is a trusted software source that provides package metadata and packages. A package manager resolves dependencies, installs files, records ownership, applies updates, and removes software cleanly.

The general workflow is search, inspect, install, update, remove, and clean. Examples vary by family:

# Debian family
sudo apt update
apt search package-name
apt show package-name
sudo apt install package-name
sudo apt remove package-name
sudo apt upgrade

# Red Hat family
sudo dnf search package-name
sudo dnf info package-name
sudo dnf install package-name
sudo dnf remove package-name
sudo dnf upgrade

yum, zypper, and pacman provide equivalent concepts with different syntax. Refreshing metadata and applying security updates regularly reduces exposure to known vulnerabilities. Remove unused packages and caches only with the package manager's supported commands.

8. Users, Groups, Ownership, and Permissions

Linux is designed for multiple users. A standard user performs routine work with limited privileges. A group collects users so shared access can be managed. The root account has unrestricted administrative power. The word root can also mean the top-level directory /; context distinguishes the two.

whoami
id
id username
groups
sudo useradd -m alice
sudo passwd alice
sudo groupadd project
sudo usermod -aG project alice
sudo userdel -r alice

Some distributions provide adduser as an interactive alternative to useradd. Use usermod to change account properties and groupadd to create groups. A user may need to sign out and in again before new group membership is reflected in a session.

Permission model

Each filesystem object has an owner, a group owner, and permissions for the owner, group, and others. Permissions are read (r), write (w), and execute (x).

PermissionFilesDirectoriesSymbolic notationNumeric value
ReadView contentsList namesr4
WriteChange contentsCreate, remove, or rename entriesw2
ExecuteRun as a programEnter or traversex1
ls -l report.txt
chmod u=rw,g=r,o= report.txt
chmod 640 report.txt
sudo chown alice:project report.txt
sudo chgrp project shared/
chmod 2770 shared/

chmod 640 means owner read/write (6), group read (4), and others no access (0). A shared workspace can be owned by a group and use group read/write/execute permissions. Directory execute permission is required to access entries inside it, even if the entries themselves are readable.

sudo runs an authorized command with elevated privileges. Use it for a specific administrative action rather than conducting an entire session as root. Advanced permission features include setuid, setgid, and the sticky bit; understand their security implications before using them.

9. Disk and Storage Administration

A physical or virtual disk may contain partitions. A partition can contain a filesystem, such as ext4 or XFS. A filesystem becomes accessible when it is attached to a directory called a mount point. These layers should be identified separately.

ConceptDescriptionHow to inspect itCommon administrative action
DiskPhysical or virtual storage devicelsblkPartition or replace in a practice environment
PartitionLogical division of a diskfdisk -l, partedCreate or resize carefully
FilesystemStructure used to store filesblkid, lsblk -fCreate with mkfs on an empty target
Mount pointDirectory exposing a filesystemfindmnt, mountMount or unmount storage
CapacityUsed and available spacedf -h, du -shRemove or relocate unnecessary data
InodesFilesystem records for filesdf -iFind and reduce excessive small files
lsblk -f
sudo blkid
sudo mkdir -p /mnt/practice
sudo mount /dev/sdb1 /mnt/practice
findmnt /mnt/practice
sudo umount /mnt/practice
df -h
du -sh /var/*

Never run mkfs on a device containing needed data. In a disposable practice disk, the general sequence is to identify the correct device, create a partition if needed, create a filesystem, create a mount point, mount it, and assign appropriate ownership or permissions.

Persistent mounts are configured in /etc/fstab. Prefer a filesystem UUID rather than a device name that may change:

sudo blkid /dev/sdb1
# Example fstab concept:
UUID=example-uuid  /mnt/practice  ext4  defaults  0  2
sudo mount -a
findmnt /mnt/practice

Validate an edited /etc/fstab with mount -a before rebooting. A syntax or device error can affect startup. Swap can be inspected with swapon --show and memory pressure with tools such as free.

10. Networking Configuration and Diagnostics

A network interface is a device or virtual adapter. It receives an IP address and prefix, such as 192.0.2.20/24. The prefix describes the local network range. A default gateway forwards traffic beyond the local network. DNS translates hostnames into IP addresses. DHCP automatically supplies addresses and related settings. The loopback interface, usually lo with address 127.0.0.1, tests the local network stack.

ip link
ip addr
ip route
hostnamectl
ss -tuln
nmcli device status
nmcli connection show

Graphically, select the network icon, choose a connection, and configure automatic DHCP or a static address, gateway, and DNS servers. On many systems, nmcli manages NetworkManager connection profiles. Other distributions may use different persistence systems, so inspect the distribution's documentation before editing network files.

TestCommand or toolWhat success indicatesLikely issue when it fails
Interface stateip linkAdapter exists and is upDisabled interface, driver, cable, or virtual-device issue
Assigned addressip addrInterface has a usable addressDHCP or static configuration failure
Local stackping -c 3 127.0.0.1TCP/IP stack responds locallyRare local stack or firewall problem
Gatewayping -c 3 gateway-addressLocal routing worksLink, address, prefix, or gateway problem
External IPping -c 3 external-ipRouting beyond the local network worksDefault route, upstream, or firewall problem
Hostname resolutionresolvectl query example-hostname or dig example-hostnameDNS returns an addressResolver or DNS configuration problem

Test in order: interface, address, loopback, gateway, external IP, then hostname. If an IP works but a hostname does not, investigate DNS using resolvectl or dig. traceroute or tracepath can help reveal where routing stops. Configure the hostname with hostnamectl when supported.

11. Processes, Services, and System Operation

A process is a running instance of a program and has a process identifier (PID). Foreground jobs occupy the terminal. Background jobs continue while the shell is available for other work.

ps aux
top
pgrep -a process-name
command &
jobs
bg %1
fg %1
kill PID
kill -TERM PID

Use a normal termination signal first. Forceful termination should be a last resort because it may prevent cleanup or data flushing.

A service is a background process managed by the operating system, often providing a system or network function. On systems using systemd, use:

systemctl status service-name
sudo systemctl start service-name
sudo systemctl stop service-name
sudo systemctl restart service-name
sudo systemctl enable service-name
sudo systemctl disable service-name
journalctl -u service-name -b
journalctl -u service-name --since '30 minutes ago'

start and stop affect the current boot. enable controls whether a service starts automatically in future boots. Check status after every change. Use shutdown or reboot for controlled system operation, and log out or close a session rather than terminating a graphical session abruptly.

12. System Maintenance and Troubleshooting

Routine maintenance includes installing security updates, checking available disk space and inodes, reviewing memory and processes, checking important service health, and reading relevant logs. Use package-manager cleanup features rather than deleting managed files manually.

Use this troubleshooting method:

  1. Describe the symptom precisely.
  2. Gather evidence with status commands, logs, configuration inspection, and recent change history.
  3. Form one likely explanation.
  4. Make one controlled change.
  5. Test the result and compare it with the original symptom.
  6. Record the change and result so the system remains understandable.

Common diagnostic paths

  • Permission denied: inspect ls -l, id, group membership, and execute permission on parent directories. Correct ownership or permissions only as necessary; use sudo only when appropriate.
  • Hostname fails but an IP works: inspect the active address, gateway, DNS configuration, and query results. The likely fault is name resolution rather than basic routing.
  • Attached disk is invisible: use lsblk -f, blkid, and findmnt to determine whether the disk has a partition, filesystem, and mount point. Check /etc/fstab for persistent mounting.
  • Package installation fails: confirm networking, refresh metadata, read repository errors, check package locks or interrupted transactions, and verify free space.
  • Service will not start: inspect systemctl status and journalctl, then check configuration syntax, dependencies, ports, ownership, permissions, and required resources.
  • Filesystem is full: run df -h, locate large paths with du, inspect logs and caches, and run df -i when space appears available but file creation still fails.

Back up before high-risk configuration, partitioning, upgrades, or permission changes. Recovery options may include restoring a configuration backup, booting recovery media, using a previous kernel, mounting a filesystem from another environment, or restoring from a tested backup.

13. Practical Administration Workflows

Build a safe practice system

  1. Choose a beginner-friendly distribution with suitable hardware support.
  2. Install it in a virtual machine or on spare hardware.
  3. Create a normal user with administrative access through sudo.
  4. Apply initial updates and confirm network, display, storage, and reboot behavior.

Create and organize project files

mkdir -p ~/course/project/{docs,src,backup}
touch ~/course/project/docs/notes.txt
cp ~/course/project/docs/notes.txt ~/course/project/backup/
mv ~/course/project/docs/notes.txt ~/course/project/docs/plan.txt
find ~/course/project -type f
rm -i ~/course/project/backup/notes.txt

Perform the same actions in the file manager, then compare the visible operations with the commands. This builds understanding of how graphical tools represent filesystem actions.

Create a shared workspace

sudo groupadd project
sudo usermod -aG project alice
sudo usermod -aG project bob
sudo mkdir -p /srv/project
sudo chown root:project /srv/project
sudo chmod 2770 /srv/project
ls -ld /srv/project

The group can collaborate in the directory while unrelated users are denied. Verify access by signing in as each account and creating test files. The setgid directory bit helps new entries inherit the directory's group on many Linux filesystems.

Attach and persist storage

  1. Identify the additional virtual disk with lsblk.
  2. Create a filesystem only on the confirmed, empty practice target.
  3. Create a mount point and mount the filesystem.
  4. Find its UUID with blkid.
  5. Add a carefully reviewed entry to /etc/fstab.
  6. Run mount -a and verify with findmnt before rebooting.

Investigate a failing service

  1. Run systemctl status service-name.
  2. Read recent entries with journalctl -u service-name.
  3. Check configuration syntax, file permissions, dependencies, and port conflicts.
  4. Make one correction, restart the service, and check status again.
  5. Enable it only if it should start automatically.

14. Exam-Relevant Notes

  • Linux is the ecosystem; the kernel is its core, and a distribution packages a complete usable system around it.
  • / is the root directory; root can also mean the unrestricted administrative account.
  • Absolute paths begin with /; relative paths depend on the current working directory; ~ means the current user's home.
  • Standard output, standard error, pipes, and redirection are separate shell concepts.
  • Directory execute permission means traversal, not merely running a program.
  • Package managers track dependencies and files; avoid manually replacing package-managed files.
  • A disk, partition, filesystem, and mount point are different layers.
  • Use UUID-based entries in /etc/fstab and validate them safely.
  • Test networking from the local interface through the gateway and external IP before diagnosing DNS.
  • Use least privilege, prefer sudo for individual tasks, and verify every administrative change.
  • Logs and documentation are evidence; do not guess when a status command or manual page can answer the question.

Next Steps

After completing these fundamentals, continue with Bash scripting, shell text processing, secure remote administration with SSH, Linux security hardening, firewall management, scheduled tasks, backup and recovery, virtualization, containers, and server administration.

See the broader Linux learning area for related Linux topics.