Skip to main content

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 systemd using systemctl commands.
  • Package Management:
    • Debian/Ubuntu: apt, dpkg.
    • RHEL/CentOS: yum, dnf, rpm.
  • 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/hosts to 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) or sudo yum install curl (RHEL/CentOS).
  • List installed packages: dpkg -l or rpm -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 systemd and why is it important?
    A2. systemd is 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 apt and yum?
    A3. apt is used in Debian/Ubuntu systems, while yum (and dnf) 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. Run systemctl status <service>. Example: systemctl status nginx.
  • Q5. How do you restart a service in Linux?
    A5. Run sudo systemctl restart <service>.
  • Q6. How do you install a package in Ubuntu?
    A6. Run sudo apt install <package>.

Scenario‑Based

  • Q7. A web server isn’t starting. What’s your first step?
    A7. Check service status: systemctl status nginx and review logs with journalctl -xe.
  • Q8. You need to add a custom hostname to resolve locally. How do you do it?
    A8. Edit /etc/hosts and 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_config to 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/.

Tips, Tricks, Roadmaps, Resources, Networking, Motivation, Guidance, and Cool Stuff ♥

Updated on Dec 21, 2025