DevOps and cloud

Stage 1 · Lesson 5 of 10

Packages and system logs

Linux, the shell and scripting

Software on a server comes from a . Debian and Ubuntu use apt; Fedora, RHEL and Amazon Linux use dnf. Learn to refresh the list of available packages, then install, remove and upgrade them.

Apply regularly, because an unpatched server is the easiest way in for an attacker. When something breaks, logs are the first place to look. record what services did and what went wrong. systemd collects service logs in one place called the journal.

Read one service's logs with journalctl -u nginx --since "1 hour ago", or follow new lines live with journalctl -f. Many programs also still write plain text files under /var/log. Reading logs quickly is the habit that later grows into and .

Common trapguessing at a fix before reading the error message, which is usually right there in the log.

A question to check yourself, an AI practice session and 2 cheat sheet entries come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

Practise

Keep handy

  • The handful of flags people actually use for each command, one line each

Also worth your time

Mark this stage as not done?