Hands-on labs for the Linux Foundation Certified System Administrator exam. Master systemd service management, LVM storage, and network configuration with nmcli.
systemd service management, LVM storage administration, and network configuration — core Linux Foundation sysadmin skills.
Lab 25: systemd Service Management
Advanced / Terminal + GUI
Scenario: Manage Services and Units with systemd
A web server must have its httpd service properly managed using systemd. You will check the service status, start and enable it, view journal logs, list all active units, and mask a conflicting service. systemd is the init system tested on the LFCS exam.
Learning Objectives:
LFCS — Service Mgmt
Status: Check service status with systemctl
Control: Start, enable, and manage service lifecycle
Logs: View and filter journal logs with journalctl
Mask: Prevent conflicting services from starting
📋 Step-by-Step Instructions
Step 1: Check Service Status
🎯 Goal: Inspect the current state of httpd
💻systemctl status httpd
💡 Tip: The output shows loaded/active state, PID, memory usage, and recent log lines.
Step 2: Start and Enable the Service
🎯 Goal: Start httpd now and enable it on boot
💻sudo systemctl start httpd
💻sudo systemctl enable httpd
💡 Tip:enable creates a symlink in the wanted-by target. Use enable --now to combine both.
Step 3: View Journal Logs for httpd
🎯 Goal: Inspect recent log output from httpd
💻journalctl -u httpd --no-pager -n 20
💡 Tip:-u filters by unit, -n 20 limits to 20 lines, --no-pager avoids interactive mode.
💡 Tip: Filter by --type and --state to narrow results. Active means currently running.
Step 5: Mask a Conflicting Service
🎯 Goal: Prevent iptables from starting (firewalld is in use)
💻sudo systemctl mask iptables
⚠️ Exam Note: Masking links to /dev/null. Unlike disable, masked services cannot be started at all.
Step 6: Verify Service is Running
🎯 Goal: Confirm httpd is active and enabled
💻systemctl is-active httpd
💻systemctl is-enabled httpd
🎓 Checkpoint: You managed a full systemd lifecycle — status, start, enable, logs, list, mask, verify.
Linux Terminal
Terminal
Service Dashboard
Journal Viewer
Activity Log
root@sysadmin:~#
Service Status
httpdinactive
Enabled on bootNo
iptablesNot masked
Active units listedNo
Journal Output
Run journalctl to populate this panel.
Recent Activity
[--:--:--]Lab session started. Ready for commands.
Progress:0/6 tasks completed
Score: 0/100
🎉 After Completing All Steps:
1. Validate configuration to check service management tasks. 2. Use Service Dashboard and Journal Viewer for visual inspection. Tip: systemd is the most-tested init system topic across LFCS, RHCSA, and Linux+.
A server needs flexible storage using LVM. You will create a physical volume, create a volume group, create a logical volume, format it with ext4, mount it, and extend the logical volume. LVM is a critical LFCS exam topic for storage management.
Learning Objectives:
LFCS — Storage Admin
PV: Create physical volumes from block devices
VG: Create and manage volume groups
LV: Create, format, and mount logical volumes
Extend: Grow logical volumes and filesystems online
📋 Step-by-Step Instructions
Step 1: Create a Physical Volume
🎯 Goal: Initialize /dev/sdb as an LVM physical volume
💻sudo pvcreate /dev/sdb
💡 Tip:pvcreate writes an LVM header to the disk. The device must not be mounted.
Step 2: Create a Volume Group
🎯 Goal: Create a volume group named datavg from the PV
💻sudo vgcreate datavg /dev/sdb
💡 Tip: A VG pools one or more PVs. Use vgdisplay to inspect the group.
Step 3: Create a Logical Volume
🎯 Goal: Create a 5G logical volume named datalv
💻sudo lvcreate -L 5G -n datalv datavg
💡 Tip:-L sets size, -n sets name. The LV appears at /dev/datavg/datalv.
Step 4: Format and Mount the LV
🎯 Goal: Create an ext4 filesystem and mount it
💻sudo mkfs.ext4 /dev/datavg/datalv
💻sudo mount /dev/datavg/datalv /mnt/data
💡 Tip: For persistence, add an entry to /etc/fstab. Always create the mount point first.
Step 5: Extend the Logical Volume
🎯 Goal: Grow the LV by an additional 2G and resize the filesystem
💻sudo lvextend -L +2G /dev/datavg/datalv
💻sudo resize2fs /dev/datavg/datalv
⚠️ Exam Note: Always resize the filesystem after extending the LV. ext4 supports online resize.
Step 6: Verify the Configuration
🎯 Goal: Confirm LVM stack is correct
💻sudo lvs
🎓 Checkpoint: You created a full LVM stack — PV, VG, LV, formatted, mounted, and extended.
Linux Terminal
Terminal
Storage Dashboard
LVM Diagram
Activity Log
root@storage:~#
LVM Status
Physical VolumeNot created
Volume GroupNot created
Logical VolumeNot created
FilesystemNot formatted
MountedNo
SizeN/A
LVM Stack Diagram
Complete LVM steps to build the diagram.
Recent Activity
[--:--:--]Lab session started. Ready for commands.
Progress:0/6 tasks completed
Score: 0/100
🎉 After Completing All Steps:
1. Validate configuration to check LVM stack. 2. Use Storage Dashboard and LVM Diagram for visual review. Tip: LVM is tested on LFCS, RHCSA, and Linux+. Know pvcreate → vgcreate → lvcreate flow.
Lab 27: Network Configuration with nmcli
Advanced / Terminal + GUI
Scenario: Configure Static Networking with NetworkManager
A server needs a static IP configuration. You will show current connections, create a new connection profile with a static IP, set DNS, bring the connection up, and verify reachability. nmcli is the standard CLI for NetworkManager tested on LFCS.
Learning Objectives:
LFCS — Networking
Show: List connections and device status
Create: Add a static IP connection profile
DNS: Configure DNS resolver settings
Verify: Activate and test network connectivity
📋 Step-by-Step Instructions
Step 1: Show Current Connections
🎯 Goal: List all NetworkManager connection profiles
💻nmcli connection show
💡 Tip: This shows active and inactive profiles. The NAME column is the profile name.
Step 2: Show Device Status
🎯 Goal: View all network device states
💻nmcli device status
💡 Tip: Devices show as connected, disconnected, or unmanaged. The TYPE shows ethernet, wifi, etc.
Step 3: Create a Static IP Connection
🎯 Goal: Add a new connection profile with static IPv4
💻Loading...
💡 Tip:con-name sets the profile name. ip4 and gw4 set static IPv4 and gateway.
Step 4: Set DNS Servers
🎯 Goal: Add DNS resolver entries to the connection
💻Loading...
💡 Tip: Multiple DNS servers are space-separated in quotes. Use ipv4.dns-search for search domains.
Step 5: Activate the Connection
🎯 Goal: Bring up the new static connection
💻sudo nmcli connection up static-eth0
⚠️ Exam Note: Activating a connection on a device deactivates any other active profile on that device.
Step 6: Verify Connectivity
🎯 Goal: Confirm the IP is assigned and gateway is reachable
💻ip addr show eth0
💻Loading...
🎓 Checkpoint: You configured a full static network setup — connection, DNS, activation, verification.
Linux Terminal
Terminal
Network Dashboard
Connection Profiles
Activity Log
root@nethost:~#
Network Status
Active Connectiondhcp-eth0
IPv4 AddressDHCP assigned
GatewayN/A
DNSNot configured
ConnectivityNot verified
Connection Profiles
Run nmcli connection show to populate.
Recent Activity
[--:--:--]Lab session started. Ready for commands.
Progress:0/6 tasks completed
Score: 0/100
🎉 After Completing All Steps:
1. Validate configuration to check network setup. 2. Use Network Dashboard and Connection Profiles for visual review. Tip: nmcli is the primary networking tool on RHEL/CentOS and is tested on LFCS and RHCSA.
Modal
Confirm Reset
Are you sure you want to reset this lab? This will:
Clear all terminal output
Reset all completed tasks
Reset service, storage, and network simulated configurations