LFCS: Operations & Deployment (25%)
This section covers system administration tasks related to configuring the kernel, managing processes,processes and services, scheduling jobs, managing software, hardwarerecovering recovery,systems, and containers.working with virtualization, containers, and SELinux.
Goals
Operations Deployment25%
1. Configure Kernel Parameters
Learn
TemporaryDifference between temporary (runtime)vsand persistent kernel parameters.- Tools:
sysctl,/etc/sysctl.conf, and/etc/sysctl.d/*.conf.
Commands
# Show all parameters
sysctl -a
# Set a runtime parameter (non-persistent)
sudo sysctl net.ipv4.ip_forward=1
# Persist parameter across reboots
echo "net.ipv4.ip_forward = 1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
# Modern persistent configuration (preferred)
echo "net.ipv4.ip_forward = 1" | sudo tee /etc/sysctl.d/99-custom.conf
sudo sysctl --system
Exercises
- Enable IP forwarding temporarily and
checkverify:status.sysctl net.ipv4.ip_forward - Make IP forwarding
permanent.permanent using/etc/sysctl.d/.
2. Manage Processes and Services
Learn
- Identify, monitor, and troubleshoot processes.
SystemdManage servicesmanagement.with systemd.
Commands
# Process management
ps aux | grep <name>
top
htop # if installed
kill <PID>
kill -9 <PID>
# Systemd service management
systemctl status <service>
systemctl start <service>
systemctl stop <service>
systemctl enable <service>
systemctl disable <service>
systemctl restart <service>
systemctl reload <service>
# View logs for a service
journalctl -u <service>
# List active services
systemctl list-units --type=service
Exercises
- Find the PID of a running process and stop it gracefully.
- Enable and start a service
onatboot.boot time.
journalctl.
3. Manage Scheduled Jobs
Learn
CronUsejobs:cron for recurring tasks (user(crontab)orand system (/etc/cron*)system-level).AtUsejobsat for one-timescheduling.scheduled jobs.
Commands
# List user cron jobs
crontab -l
# Edit user cron jobs
crontab -e
# System-wide cron directories
ls /etc/cron.daily/
ls /etc/cron.weekly/
# At job example
echo "touch /tmp/testfile" | at now + 1 minute
atq # list scheduled at jobs
atrm <job_number>
Exercises
- Schedule a
jobscript to runa scriptevery day at3am.3 AM. - Schedule a one-time task using
at.
/etc/cron.daily/ for system maintenance tasks.
4. Software Management
Learn
- Install, update,
validateandpackagesremove software usingnativeyour system’s package manager. RepositoriesManage repositories anddependency management.dependencies.
Commands
# Debian/Ubuntu
sudo apt update
sudo apt install <package>
sudo apt remove <package>
dpkg -l | grep <package>
dpkg -s <package>
# Manage repositories
sudo add-apt-repository ppa:<repo>
cat /etc/apt/sources.list.d/*.list
# RHEL/CentOS
sudo yum install <package>
sudo yum remove <package>
rpm -qa | grep <package>
rpm -qi <package>
# Repository management
yum repolist
Exercises
- Install
curland verifyit is installed.installation. - Remove a package and confirm removal.
5. Recover from Hardware, OS, or Filesystem Failures
Learn
- Boot into
rescue/rescue or recovery mode. - Use Live CD/USB for system repair.
Basic filesystem check:Usefsck.to check and repair filesystems.
Commands
# Filesystem check (unmounted partition)
sudo fsck /dev/sdX1
# Mount for inspection or repair
sudo mount /dev/sdX1 /mnt
# Kernel/hardware diagnostics
dmesg | less
journalctl -xb
# Disk health (if smartmontools installed)
sudo smartctl -a /dev/sdX
Exercises
- Simulate a corrupted filesystem on a test partition and repair
it.it usingfsck. - Boot into rescue mode and inspect
diskpartitionspartitions.withlsblk.
journalctl -xb.
6. Virtual Machines (libvirt)
Learn
Install and manageManage VMs using libvirt tools (virsh,virt-install).
virshCommands
virsh list --all
virsh start <vm>
virsh shutdown <vm>
virsh destroy <vm> # forceForce shutdown
virsh console <vm>
# Virtual network management
virsh net-list
virsh net-start default
Exercises
- Create a VM using
virt-install. - Start, stop, and connect to the VM via console.
- Verify virtual networks using
virsh net-list.
7. Containers (Docker / Podman)
Learn
- Create, start, stop, and manage
containers.containers and images. - Understand container networking and
volumes.volumes.
Commands
# RunDocker containerexamples
docker run -it --name mycontainer ubuntu bash
# List running containers
docker ps
# Stop and remove container
docker stop mycontainer
docker rm mycontainer
# Listdocker images
docker rmi <image>
# Volumes and networks
docker volume ls
docker network ls
# Podman equivalents (rootless alternative)
podman run -it --name mycontainer ubuntu bash
podman ps
podman images
podman rm -a
Exercises
- Create an Ubuntu container and install
curlinside it. - Commit the container
changes toas a newimage.image:docker commit mycontainer ubuntu-with-curl - Remove the container and image.
8. SELinux (Mandatory Access Control)
Learn
Enforce,SELinuxpermissive,modes:andenforcing, permissive, disabledmodes..- Troubleshoot SELinux
denials.denials and manage contexts.
Commands
# Check currentSELinux modestatus
sestatus
# Change mode temporarily
sudo setenforce 0 # permissive
sudo setenforce 1 # enforcing
# Check SELinuxlogs logsfor denials
ausearch -m avc
# Check and restore file contexts
ls -Z /path
restorecon -Rv /path
# Manage custom contexts
sudo semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
sudo restorecon -Rv /web
Exercises
- Switch SELinux to permissive mode and verify.
- Trigger an SELinux denial (e.g.,
wrongmislabelfile context)file) andcheckviewlogs.logs withausearch.
🧪 Exam Tips
- Practice all commands without
root shortcuts(sudo),to simulateas examconditions.environments often run as root. - Understand the difference between runtime vs persistent
changesconfigurations: - Kernel parameters (
kernel,sysctl)
journalctl, dmesg, ausearch).
✅ Summary:
This guide now comprehensively covers all Operations Deployment (25%) objectives: