FlashGenius Logo FlashGenius
Linux+ XK0-006 ยท Domain 1 of 5 ยท 23%

System Management

Boot Process ยท GRUB2 ยท LVM ยท RAID ยท Networking ยท Shell Ops ยท Backups ยท Virtualization

System Management is the largest domain at 23% of the XK0-006 exam. It covers the Linux system from power-on to running services โ€” boot process, hardware, storage, networking, the shell, backups, and virtualization.
Core Concepts

Linux Boot Sequence

BIOS/UEFI โ†’ bootloader (GRUB2) โ†’ kernel loads โ†’ initramfs โ†’ systemd (PID 1) โ†’ targets โ†’ login. Every stage has specific config files and failure modes. Understanding this sequence is essential for troubleshooting boot issues.

Filesystem Hierarchy Standard (FHS)

/ (root), /boot (kernel/GRUB), /etc (config), /var (variable data/logs), /home (user dirs), /usr (user binaries), /tmp (temp, cleared on reboot), /proc and /sys (virtual kernel interfaces), /dev (device files), /mnt and /media (mount points).

Linux Kernel Architectures

x86_64 (most servers/desktops), ARM (embedded/Raspberry Pi/cloud), aarch64 (ARM 64-bit). Kernel manages hardware abstraction, memory, processes, filesystems. Modules extend kernel functionality without recompiling.

Virtualization Role

Linux hosts virtual machines via KVM (Kernel-based Virtual Machine) + QEMU. libvirt/virsh provide management. Understanding VMs, disk images (qcow2, raw), and hypervisor types (Type 1 bare-metal, Type 2 hosted) is explicitly tested in XK0-006.

Boot Process โ€” Step by Step
1

BIOS/UEFI

POST (Power-On Self Test) โ†’ finds bootable device. BIOS uses MBR (Master Boot Record, first 512 bytes). UEFI uses GPT (GUID Partition Table), supports Secure Boot, stored in /boot/efi.

2

GRUB2 Bootloader

Loads from MBR or EFI partition. Config: /etc/default/grub (user-editable) + /boot/grub2/grub.cfg (generated โ€” do NOT edit directly). Regenerate with grub2-mkconfig -o /boot/grub2/grub.cfg. GRUB menu allows kernel selection, recovery mode, single-user mode.

3

Kernel + initramfs

GRUB loads kernel (vmlinuz) and initial ramdisk (initramfs/initrd) into memory. initramfs mounts a temporary root filesystem with drivers needed to mount the real root. Kernel decompresses and takes over hardware.

4

systemd (PID 1)

First process after kernel. Reads unit files from /etc/systemd/system/ and /lib/systemd/system/. Brings system to a target (replaces SysV runlevels).

5

Systemd Targets

poweroff.target (0), rescue.target (1/single-user), multi-user.target (3/multi-user no GUI), graphical.target (5/GUI), reboot.target (6). Check: systemctl get-default. Change: systemctl set-default multi-user.target

6

Login

getty launches login prompt. PAM authenticates user. Shell starts (bash, zsh, etc.)

Kernel Modules & Hardware

Kernel Modules

Loadable kernel extensions for drivers and functionality. Commands: lsmod (list loaded modules), modprobe module_name (load with dependencies), modprobe -r module_name (remove), modinfo module_name (show info). Persistent loads: /etc/modules-load.d/*.conf

Hardware Discovery Tools

lspci โ€” list PCI devices (network cards, GPUs). lsusb โ€” list USB devices. lshw โ€” detailed hardware info. dmidecode โ€” BIOS/SMBIOS info (RAM, CPU, board). lscpu โ€” CPU architecture info. dmesg โ€” kernel ring buffer (hardware events, driver messages).

Device Files

/dev/sda (first SATA/SCSI disk), /dev/sdb (second), /dev/nvme0n1 (NVMe), /dev/vda (virtual disk in KVM). Partitions: /dev/sda1, /dev/sda2. Block devices (b) vs character devices (c) in ls -l /dev/

GRUB2 Recovery Reference
ScenarioAction
Edit kernel params onceAt GRUB menu โ†’ press e โ†’ edit linux line โ†’ Ctrl+X to boot
GRUB rescue promptset root=(hd0,1) โ†’ set prefix=/boot/grub2 โ†’ insmod normal โ†’ normal
Rebuild grub.cfggrub2-mkconfig -o /boot/grub2/grub.cfg
Reset forgotten root passwordBoot to rescue/emergency target โ†’ passwd root โ†’ touch /.autorelabel (SELinux)
Single-user modeAdd single or 1 to kernel line in GRUB
Storage โ€” Partitioning & Filesystems

Partitioning Tools

fdisk โ€” MBR partitions (interactive, supports up to 4 primary or 3+extended). gdisk โ€” GPT partitions (needed for >2TB disks or UEFI). parted โ€” supports both MBR and GPT, scriptable. After partitioning: partprobe to inform kernel, then mkfs.ext4 /dev/sda1 to format.

Filesystem Types

ext4 (default Linux, journaled, stable, max 16TB), xfs (high performance, default RHEL, good for large files), btrfs (copy-on-write, snapshots, built-in RAID), swap (virtual memory extension). Format: mkfs.ext4, mkfs.xfs, mkswap. Enable swap: swapon /dev/sda2

LVM โ€” Logical Volume Management
ComponentCommandDescription
Physical Volumepvcreate /dev/sdbInitialize disk/partition for LVM
Volume Groupvgcreate vg_data /dev/sdbPool of physical volumes
Logical Volumelvcreate -L 20G -n lv_data vg_dataVirtual partition from VG
Formatmkfs.ext4 /dev/vg_data/lv_dataCreate filesystem on LV
Extend LVlvextend -L +10G /dev/vg_data/lv_data then resize2fsGrow logical volume online
Displaypvs, vgs, lvsShow PV/VG/LV info
RAID Levels
RAIDMin DisksRedundancyPerformanceNotes
RAID 02NoneBest read/writeStriping โ€” any disk failure = total loss
RAID 121 disk can failRead fasterMirroring โ€” 50% capacity
RAID 531 disk can failGoodStriping + parity โ€” (n-1) capacity
RAID 642 disks can failModerateDouble parity โ€” (n-2) capacity
RAID 1041 per mirror pairExcellentStripe of mirrors
Mounting

mount Command

mount /dev/sda1 /mnt โ€” temporarily mount. mount -t ext4 /dev/sda1 /mnt โ€” specify type. umount /mnt โ€” unmount. mount -a โ€” mount all in /etc/fstab. Check mounts: mount, df -h, lsblk

/etc/fstab

Persistent mount configuration. Format: DEVICE MOUNTPOINT FSTYPE OPTIONS DUMP PASS. Use UUID (not device name) for reliability: UUID=abc123 /data ext4 defaults 0 2. Options: defaults, ro (read-only), noexec, nosuid, nofail (boot even if mount fails).

Networking

ip Command Suite

Replaces ifconfig/route/netstat. ip addr show โ€” show IP addresses. ip addr add 192.168.1.10/24 dev eth0 โ€” add IP. ip link set eth0 up/down โ€” enable/disable interface. ip route show โ€” routing table. ip route add default via 192.168.1.1 โ€” add default gateway. ip neigh โ€” ARP table.

NetworkManager & nmcli

nmcli device status โ€” show all devices. nmcli connection show โ€” list connections. nmcli connection up CONNECTION_NAME โ€” activate. nmcli con mod CONNECTION_NAME ipv4.addresses 192.168.1.10/24 โ€” modify IP. Config files: /etc/NetworkManager/system-connections/

DNS Configuration

/etc/resolv.conf โ€” nameserver entries (often managed by NetworkManager/systemd-resolved). /etc/hosts โ€” local hostname resolution (checked first). dig domain.com โ€” DNS lookup with details. nslookup domain.com โ€” simple DNS lookup. host domain.com โ€” quick lookup. /etc/nsswitch.conf controls resolution order (files โ†’ dns).

Shell Operations

Navigation & File Operations

pwd (print working dir), ls -la (long list + hidden), cd - (previous dir), find /path -name "*.log" (find files), locate filename (indexed search), which command (find binary), type command (built-in or external). Wildcards: * (any chars), ? (one char), [abc] (character class).

Redirection & Pipes

> redirect stdout (overwrite), >> append, 2> redirect stderr, 2>&1 merge stderr into stdout, &> both to file, /dev/null (discard). | pipe stdout to next command. tee split to file + stdout. Examples: ls 2>/dev/null, command > out.txt 2>&1

Environment Variables

export VAR=value โ€” set for current session + child processes. echo $VAR โ€” display. env โ€” show all. unset VAR โ€” remove. Persistent: add to ~/.bashrc (user) or /etc/environment (system). Key vars: PATH, HOME, USER, SHELL, PS1 (prompt), LANG.

Text Processing

grep -r "pattern" /path (recursive), grep -i (case-insensitive), awk '{print $1}' (field extraction), sed 's/old/new/g' (substitute), cut -d: -f1 /etc/passwd (field cut), sort, uniq, wc -l (line count), head -n 10, tail -f /var/log/syslog (follow log).

Backups & Restores

tar (Tape Archive)

Create: tar -czf backup.tar.gz /path (create, gzip, file). Extract: tar -xzf backup.tar.gz (extract, gzip, file). List: tar -tzf backup.tar.gz. -c=create, -x=extract, -z=gzip, -j=bzip2, -J=xz, -v=verbose, -f=filename, -C /dest=extract to directory.

rsync

Efficient incremental sync. rsync -av /source/ /dest/ (archive + verbose). rsync -avz user@remote:/path /local/ (remote sync with compression). -a=archive (preserves permissions, timestamps, symlinks), --delete (remove files deleted at source), --exclude='*.tmp'. Faster than cp โ€” only transfers changes.

dd

Low-level disk copy. dd if=/dev/sda of=/backup/disk.img bs=4M status=progress โ€” create disk image. dd if=/dev/zero of=/dev/sdb bs=1M โ€” wipe disk. bs = block size. Dangerous โ€” no safety checks. Use for disk cloning, creating bootable USBs, wiping disks.

Compression Tools

gzip file โ†’ file.gz (fast, moderate compression). bzip2 file โ†’ file.bz2 (slower, better compression). xz file โ†’ file.xz (best compression, slowest). zip/unzip (cross-platform). Decompress: gunzip, bunzip2, unxz.

Virtualization

KVM (Kernel-based Virtual Machine)

Linux's native Type 1 hypervisor (runs inside the kernel). Requires CPU virtualization extensions (Intel VT-x or AMD-V). Check: lscpu | grep Virtualization or egrep '(vmx|svm)' /proc/cpuinfo. Works with QEMU for full hardware emulation.

virsh Commands

virsh list --all (list VMs), virsh start vm_name, virsh shutdown vm_name, virsh destroy vm_name (force off), virsh define vm.xml (create from XML), virsh dumpxml vm_name (export config), virsh console vm_name (connect to console). VMs stored in /etc/libvirt/qemu/

VM Disk Images

qcow2 (QEMU Copy-On-Write โ€” supports snapshots, thin provisioning, preferred format). raw (no overhead, best performance, no snapshots). qemu-img create -f qcow2 disk.qcow2 20G โ€” create image. qemu-img info disk.qcow2 โ€” show info. qemu-img convert -f raw -O qcow2 disk.raw disk.qcow2 โ€” convert formats.

10 scenario-based questions covering the full System Management domain. Select an answer, click Check Answer, then move to the next question. View your final score at the bottom.
1. What is the correct order of the Linux boot process?
2. A sysadmin needs to create a new Linux server that will use a 4TB disk and UEFI firmware. Which partitioning tool and partition table type is required?
3. A sysadmin creates a RAID array across 4 disks and needs to tolerate the failure of any 2 disks simultaneously. Which RAID level should they use?
4. Which command correctly creates a logical volume named lv_app with a size of 10GB from the volume group vg_data?
5. A server reboots but the filesystem in /etc/fstab fails to mount. The system drops to an emergency shell and the admin cannot fix the issue without booting normally. Which fstab option would have prevented this?
6. Which command displays the current default systemd target?
7. A Linux admin needs to incrementally synchronize /var/data/ to a remote server at backup.example.com, preserving all file permissions and only transferring changed files. Which command achieves this?
8. Which file should a sysadmin modify to make an environment variable persistent for all users system-wide on a Linux system?
9. What does the command ip route add default via 192.168.1.1 do?
10. A sysadmin needs to create a full disk image of /dev/sda for backup purposes. Which command is correct?

Quiz Complete!

0/10

Six mnemonic hooks to anchor the highest-yield System Management concepts. Each hook gives you a mental shortcut for exam recall under pressure.
๐Ÿš€

Boot Order

"Big Giraffes Keep Ignoring Sunsets"

BIOS/UEFI โ†’ GRUB2 โ†’ Kernel โ†’ Initramfs โ†’ Systemd. Five stages, in order, every time Linux boots.

๐Ÿ“ฆ

LVM Order

"PVs Fill VGs, VGs Birth LVs"

pvcreate (Physical Volume) โ†’ vgcreate (Volume Group) โ†’ lvcreate (Logical Volume) โ†’ mkfs โ†’ mount. Always in this order.

๐Ÿ›ก๏ธ

RAID Tolerance

"0=Zero survivors, 1=One mirror, 5=One parity, 6=Two parity, 10=Best of both"

RAID 0=no redundancy. RAID 1=1 disk failure OK. RAID 5=1 disk failure OK. RAID 6=2 disk failures OK. RAID 10=1 per mirror pair.

๐Ÿ”„

rsync vs dd vs tar

"rsync=Smart Sync, dd=Dumb Copy, tar=Archive Bundle"

rsync: incremental, network-aware, preserves attrs. dd: bit-for-bit block copy (disks/images). tar: bundle files into archive with compression.

๐ŸŒ

ip Command Cheatsheet

"ip addr=IPs, ip route=Routes, ip link=Interfaces, ip neigh=ARP"

ip addr show, ip route show, ip link set eth0 up, ip neigh show. Replaces ifconfig, route, arp.

๐Ÿ–ฅ๏ธ

KVM Check

"vmx=Intel VT-x, svm=AMD-V โ€” without these, no KVM"

egrep '(vmx|svm)' /proc/cpuinfo โ€” if output is empty, CPU doesn't support hardware virtualization. No virtualization extensions = no KVM VMs.

Click any card to flip it and reveal the answer. Work through all 8 cards, then use the Study Advisor below to get a personalized study plan.
Flashcards โ€” click to flip
Flashcard 1 of 8
Linux boot sequence โ€” 5 stages in order
Tap to reveal answer
Answer
BIOS/UEFI (POST, find bootable device) โ†’ GRUB2 (load kernel) โ†’ Kernel + initramfs (hardware init, temp root) โ†’ systemd PID 1 (read unit files) โ†’ Target reached (login prompt). Mnemonic: Big Giraffes Keep Ignoring Sunsets
Flashcard 2 of 8
GRUB2: config files and how to regenerate grub.cfg
Tap to reveal answer
Answer
User edits: /etc/default/grub. Generated file (do NOT edit): /boot/grub2/grub.cfg. Regenerate: grub2-mkconfig -o /boot/grub2/grub.cfg. UEFI path: /boot/efi/EFI/distro/grub.cfg
Flashcard 3 of 8
LVM creation sequence โ€” 4 commands
Tap to reveal answer
Answer
1. pvcreate /dev/sdb โ€” init disk for LVM. 2. vgcreate vg_name /dev/sdb โ€” create VG. 3. lvcreate -L 20G -n lv_name vg_name โ€” create LV. 4. mkfs.ext4 /dev/vg_name/lv_name then mount. Display: pvs, vgs, lvs
Flashcard 4 of 8
RAID 5 vs RAID 6 vs RAID 10 โ€” min disks, fault tolerance, use case
Tap to reveal answer
Answer
RAID 5: min 3 disks, 1 disk failure, (n-1) capacity, general purpose. RAID 6: min 4 disks, 2 disk failures, (n-2) capacity, large arrays. RAID 10: min 4 disks, 1 per mirror pair, 50% capacity, best performance + redundancy.
Flashcard 5 of 8
rsync flags: what does -avz do?
Tap to reveal answer
Answer
-a (archive: preserves permissions, timestamps, symlinks, recursive), -v (verbose output), -z (compress during transfer). Common additions: --delete (mirror source), --exclude='pattern', -n (dry run). Transfers only CHANGED files โ€” efficient for backups.
Flashcard 6 of 8
systemd targets โ€” what replaced runlevels 0,1,3,5,6?
Tap to reveal answer
Answer
0 โ†’ poweroff.target. 1 โ†’ rescue.target. 3 โ†’ multi-user.target (server default โ€” no GUI). 5 โ†’ graphical.target (desktop). 6 โ†’ reboot.target. Check: systemctl get-default. Set: systemctl set-default multi-user.target
Flashcard 7 of 8
ip command: show IPs, add IP, set default gateway
Tap to reveal answer
Answer
ip addr show โ€” list all IPs. ip addr add 10.0.0.5/24 dev eth0 โ€” add IP. ip route show โ€” routing table. ip route add default via 10.0.0.1 โ€” set default gateway. ip link set eth0 up โ€” enable interface. Replaces: ifconfig, route, arp.
Flashcard 8 of 8
tar: create compressed archive vs extract
Tap to reveal answer
Answer
Create: tar -czf backup.tar.gz /path/ (gzip) or tar -cjf backup.tar.bz2 /path/ (bzip2). Extract: tar -xzf backup.tar.gz -C /dest/. List: tar -tzf backup.tar.gz. Flags: c=create, x=extract, z=gzip, j=bzip2, J=xz, v=verbose, f=file, C=destination.
Study Advisor
Start with the boot sequence (Big Giraffes Keep Ignoring Sunsets). Learn the FHS directory structure (/etc, /var, /boot, /dev). Then practice basic shell navigation, redirection (>, >>, 2>), and pipes (|).
Study LVM (pvcreateโ†’vgcreateโ†’lvcreateโ†’mkfs) and RAID levels (0=no redundancy, 1=mirror, 5=1 parity, 6=2 parity, 10=striped mirrors). Learn /etc/fstab format (UUID, options, dump/pass) and the ip command suite.
Master GRUB2 recovery (edit kernel params, rescue prompt, rebuild grub.cfg), rsync vs dd vs tar use cases, KVM/virsh commands, kernel module management (modprobe, /etc/modules-load.d/), and systemd target management.
High-yield topics: Boot order (BIOSโ†’GRUB2โ†’Kernelโ†’initramfsโ†’systemd), LVM sequence (PVโ†’VGโ†’LV), RAID 6=2 failures, nofail in fstab, ip addr/ip route commands, systemctl get-default, tar czf/xzf flags, rsync -av for incremental backup.
Boot: BIOSโ†’GRUB2โ†’Kernelโ†’initramfsโ†’systemd. LVM: pvcreateโ†’vgcreateโ†’lvcreateโ†’mkfs. RAID 0=none, 1=mirror, 5=1parity, 6=2parity, 10=mirror+stripe. ip addr/ip route/ip link. fstab nofail. tar czf=create / xzf=extract. rsync -av=incremental. grub2-mkconfig=rebuild config.