Stage 3: Config Warrior
Teach learners how to manage Linux configuration files, services, and packages. Build confidence in editing configs, controlling system services, and installing software - skills that interviewers often test to assess real‑world system administration ability.
Hackbook Overview
- Configuration Files: Most system configs live in
/etc(e.g.,/etc/hosts,/etc/fstab,/etc/ssh/sshd_config). - System Services: Managed by
systemdusingsystemctlcommands. - Package Management:
- Debian/Ubuntu:
apt,dpkg. - RHEL/CentOS:
yum,dnf,rpm.
- Debian/Ubuntu:
- Why It Matters: Configs and services define how Linux behaves. Package managers ensure systems are up‑to‑date and secure.
Hands‑On Practice
- Edit
/etc/hoststo add a custom hostname. - Restart SSH service:
sudo systemctl restart ssh. - Check service status:
systemctl status nginx. - Install a package:
sudo apt install curl(Debian/Ubuntu) orsudo yum install curl(RHEL/CentOS). - List installed packages:
dpkg -lorrpm -qa.
Interview Question Bank
Conceptual
- Q1. Where are most Linux configuration files stored?
A1. In/etc. Examples:/etc/hosts(hostnames),/etc/fstab(file systems),/etc/ssh/sshd_config(SSH service). - Q2. What is
systemdand why is it important?
A2.systemdis the init system that manages services, startup processes, and system states. It replaced older init systems for efficiency and consistency. - Q3. What’s the difference between
aptandyum?
A3.aptis used in Debian/Ubuntu systems, whileyum(anddnf) are used in RHEL/CentOS systems. Both manage software packages but use different repositories.
Practical
- Q4. How do you check if a service is running?
A4. Runsystemctl status <service>. Example:systemctl status nginx. - Q5. How do you restart a service in Linux?
A5. Runsudo systemctl restart <service>. - Q6. How do you install a package in Ubuntu?
A6. Runsudo apt install <package>.
Scenario‑Based
- Q7. A web server isn’t starting. What’s your first step?
A7. Check service status:systemctl status nginxand review logs withjournalctl -xe. - Q8. You need to add a custom hostname to resolve locally. How do you do it?
A8. Edit/etc/hostsand add the hostname with its IP address. - Q9. A package installation fails. How do you troubleshoot?
A9. Check internet connectivity, repository configuration, and logs (/var/log/apt/or/var/log/yum.log).
Behavioral Based
- Q10. Tell me about a time you solved a configuration issue.
A10. Example: “I once fixed a deployment error by editing/etc/ssh/sshd_configto allow key‑based authentication, which restored secure access.”
Cheatsheet (Quick Notes)
- Configs:
/etc/hosts,/etc/fstab,/etc/ssh/sshd_config. - Services:
systemctl start|stop|restart|status <service>. - Packages:
apt,dpkg(Debian/Ubuntu);yum,dnf,rpm(RHEL/CentOS). - Logs:
journalctl -xe,/var/log/.

Updated on Dec 21, 2025