Your DevOps study space

Real explanations. Videos with tests. Fresh exams every time. Keep the streak alive and watch the XP stack up.

Processes and services · Linux Docs · StackwisePlanDevOps Processes and services · Linux Docs · StackwiseCodePython Processes and services · Linux Docs · StackwiseBuildDocker Processes and services · Linux Docs · StackwiseTestDevOps Processes and services · Linux Docs · StackwiseReleaseGit Processes and services · Linux Docs · StackwiseDeployKubernetes Processes and services · Linux Docs · StackwiseOperateLinux Processes and services · Linux Docs · StackwiseMonitorDevOps

Pick a topic

Eight tracks, each with docs, a cheat sheet, videos and tests.

How it works

One loop, repeated until it sticks.

Jump back in

Picked up from where you left off.

Free forever

Your DevOps journey starts with one click.

Sign in with Google or GitHub to open every chapter, video, test and challenge. Your progress is saved wherever you learn.

Processes and services

Every running program is a process. Servers are mostly long-running processes (web servers, databases, your app) that need to start on boot, restart when they crash and be stopped cleanly, and Linux has tools for each of those jobs.

What a process is

When you run a command, the kernel creates a process: a running copy of that program with its own memory, open files and a unique number called the PID (process ID). Every process is started by another one, its parent, so they form a tree. At the very top is PID 1, which on modern systems is systemd, the program that boots the system and supervises services.

Seeing what is running

$ ps aux                     # snapshot of every process
$ ps aux | grep nginx        # just the nginx ones
$ top                        # live view, sorted by CPU (q to quit)
$ htop                       # friendlier live view, if installed
$ free -h                    # memory used / free
$ uptime                     # running time + load average

In ps aux the useful columns are USER, PID, %CPU, %MEM and COMMAND. The load average in uptime (three numbers: last 1, 5 and 15 minutes) is roughly how many processes were waiting for CPU. Compare it with the number of CPU cores: a load of 4 on a 4-core machine means it is fully busy.

Stopping processes: signals

You don't really "kill" a process, you send it a signal. kill PID sends SIGTERM (15), a polite request: the program can finish writing files, close connections and exit cleanly. kill -9 PID sends SIGKILL, which the kernel enforces immediately and the program can't catch, so nothing gets cleaned up. Always try the polite one first; use -9 only for something that's stuck. pkill nginx signals processes by name instead of number, and Ctrl+C in a terminal sends SIGINT to whatever is running in the foreground.

Foreground and background

A normal command holds your terminal until it finishes. Add & to run it in the background (./long-task.sh &), see background jobs with jobs and bring one back with fg. Background jobs still die when you close the SSH session; nohup command & keeps them running, but for anything that should stay up permanently you want a service.

Services with systemd

A service (or daemon) is a background program that systemd starts, watches and restarts. Each one is described by a unit file, for example /etc/systemd/system/myapp.service, which says which command to run, as which user, and what to do if it crashes.

$ sudo systemctl status nginx     # running? recent log lines?
$ sudo systemctl start nginx      # start now
$ sudo systemctl stop nginx       # stop now
$ sudo systemctl restart nginx    # stop + start (after config changes)
$ sudo systemctl reload nginx     # re-read config without dropping connections
$ sudo systemctl enable nginx     # start automatically on every boot
$ sudo systemctl disable nginx    # don't start on boot
$ journalctl -u nginx -f          # that service's logs, live
start and enable are different things: start affects right now, enable affects the next boot. A fresh install usually needs both (systemctl enable --now nginx does both at once).

For Node.js apps you'll also meet PM2, a process manager that keeps the app running, restarts it on crash and can register itself with systemd, which is what the Traversy server-setup video uses.

Scheduled jobs with cron

cron runs commands on a schedule. crontab -e opens your list of jobs; each line has five time fields followed by the command:

# minute  hour  day-of-month  month  day-of-week  command
0 3 * * *     /home/demee/backup.sh        # every day at 03:00
*/15 * * * *  /usr/local/bin/healthcheck   # every 15 minutes
0 9 * * 1     /home/demee/report.sh        # Mondays at 09:00

* means "every", and */15 means "every 15th". Cron jobs run with a minimal environment, so use full paths in them.

Questions

Pick an answer. Get it wrong and you can try again right away, no waiting. 10 questions per topic - pick a filter below, then use Recreate questions for a fresh set on that topic.

Fresh questions every time

Exam

A mixed test across the whole site, shuffled so you never know which topic comes next. When you submit, every mistake comes with the reason and a jump to the exact moment in the video that explains it.

30 questions 6 topics 20 minute limit Up to 70 XP
1–4 answer · ←→ move
History

Essay

0 / 200-250 words
Sample answer
History
0:00 / 0:00
Not started

on YouTube
Subscribe

Topic progress

Activity

Achievements

Settings

Your profile and your account.

Profile details

* Required. Saved in this browser until you sign in.

Letters, numbers, dots, dashes and underscores.
0 / 160

Account

Checking…

App

Install Stackwise on your phone or computer. It opens in its own window from your home screen, and the Docs and cheat sheets you've opened keep working without internet.

Only admins can see this

Dashboard

Sign-ups, activity, messages and reviews in one place.

Prove it

Certificates

Pass a topic's test and get a certificate with its own public page you can share or add to LinkedIn. Each test is 10 questions drawn at random and graded on the server; you need 8 right, you have 15 minutes, and you get one try per topic a day.

From first command to production

Linux for DevOps

A path through Linux the way DevOps engineers use it: ten stages, every command explained with its flags, examples, real output and mistakes, the combinations engineers chain together, and incidents worked through step by step. Practise everything in a safe lab folder.

Before the interview

Interview prep

Questions that come up in real DevOps interviews, with the kind of answer that lands. Say yours out loud first, then compare. Each one links to the chapter that goes deeper.

    Private to you

    My notes

    Everything you wrote down while watching and reading, in one place. Saved to your account, never shown to anyone.