Skip to content
EgyKode
01 · FoundationsLab 2 / 59
Challengelinux

Linux Processes, Services & Logs — Challenge

Find the process, read what it actually said, and restore a service that will not start.

Time
22 min
Level
Beginner
Objectives
4 objectives
Cost
Free

Where this fits in the platform

This lab adds

  • The ability to find why a service died

Before you start

You will need

  • Linux with systemd
  • sudo access

You do not need these already — the lab environment below provides them.

You will be able to

  • Locate a process by port, name or open file
  • Read a service's own logs rather than guessing from its status
  • Tell a crash apart from a configuration error

CostFree

— any Linux machine, VM or container.

The goal#

Achieve the same outcome as Linux Processes, Services & Logs, from an empty starting point, without the steps.

A service is down. systemctl status says failed, which tells you that it failed and nothing about why.

This lab builds the sequence that gets from that word to the cause.

Hands-on environment

Run this lab in a real terminal, free and in your browser. The environment is temporary and yours alone — break it as much as you like.

Start the challenge

Opens in Killercoda, in a new tab — keep this page open for the steps.

This is the guided lab's environment — the same machine, with its walkthrough on the left. Work from the task above and leave those steps alone until you are done, or you are reading the answers.

Run it on your own machine

Run this lab on your own machine. One command starts the environment, with everything the lab needs already installed:

You will need:

  • bash
git clone https://github.com/EgyKode/EgyKode-lab.git
cd EgyKode-lab
./egykode start
./egykode shell
ssh node1

You need Docker and Git installed. Everything else runs inside the environment. The first start downloads it and takes a few minutes; later starts are seconds.

Not sure what you already have? Run: npm run doctor — it checks and changes nothing.

Anything you tick here is your own record. EgyKode cannot see inside that terminal, so the success criteria stay self-assessed even when the environment checks your work for you.

What must be true when you are done

Step 1 of 3

What must be true when you are done#

  • You can name the PID holding a given port, and the command that told you.
  • You can show the last 50 log lines for one service without reading the whole journal.
  • A deliberately broken service is diagnosed from its logs and restored.
  • You can explain the difference between failed, inactive and activating.

Rules#

  • Do not open the guided lab until you are finished, or until the same problem has held you up for 20 minutes.
  • Documentation is allowed and encouraged.
  • Verify every criterion with a command whose output you can read.

If you get stuck#

  1. What did you expect, exactly?
  2. What happened instead — the error text, not a paraphrase?
  3. Which layer is that error from?
  4. What is the smallest command that proves the layer below is fine?

You are done when

0 of 4

The concept behind it

Stuck?Open the guided lab

Next up

Lab 2 of 59 on the project path

Linux Security & SSH HardeningLock down SSH without locking yourself out, and know how to recover when you inevitably do.45 minBeginner