World map

 

BM: Baca dalam Bahasa Melayu

World D0: Start Here

Linux crash course

You will learn: five Linux words that explain most container errors: paths, permissions, processes, environment variables and exit codes.

Checked with Docker Engine 29 on 31 Oct 2026

The problem

The script refuses to run: bash: ./cook.sh: Permission denied. Docker transcript: $ ./cook.sh bash: ./cook.sh: Permission denied

Your laptop~/kitchen

  • No open hatches

Lunchboxes (containers)

  • No containers yet

Frozen packs (images)

  • nginx:1.30-alpine8 layers · 93.5MB

0 containers (0 running), 1 images, 0 lockers.

This script stops with Permission denied. A container is a small Linux computer. So most container errors are Linux errors. Five Linux words will save you.

Watch

Linux keeps files in folders inside folders, like jars on shelves. A file’s full address is its path: A file's full address, from the top folder down: /home/you/kitchen/menu.txt.. Build the path to the menu, from the top down.

Top folder first. Put these in order. Use the arrows, or drag.

  • you
  • home
  • / (the top folder)
  • kitchen
  • menu.txt

Try it

Every file has permissions: Who may read (r), change (w) or run (x) a file. ls -l shows them.: r read, w write, x run. ls -l shows them. chmod +x cook.sh adds the run permission. Do it, then run ./cook.sh.

Watch

A file just sits on the shelf. A program that is running is a process: A program that is running right now. Each one has a number, its PID.. Each one gets a number, its PID. File or process? Sort them.

Drag a card into a box. Or tap the card, then tap the box.

      Try it

      An environment variable: A sticky note on the kitchen wall: a setting every program can read, like CHEF=Kancil. is a sticky note on the kitchen wall. Every program you start can read it. Stick one up with export. Read it with echo.

      Watch

      Every process ends with a number: its exit code: The number a program leaves when it ends. 0 means all good. Anything else means trouble.. 0 means all good. Anything else means trouble. echo $? shows the last one. Tap every exit code.

      Tap the two exit codes.

      0 of 2 found

      Predict

      docker ps -a says your container Exited (1). What does the 1 tell you?

      Pick one answer.

      Check

      True or not? Swipe right when it is true.

      Swipe right for good, left for needs work. Or use the buttons.

      1 / 5

      chmod +x lets a script run

      chmod +x lets a script run

      You did it!

      You can now read the five Linux words behind most container errors.

      Go deeper (optional)
      After docker run, ps aux on the laptop lists nginx: master process. The container is a process. Docker transcript: $ docker run -d --name stall nginx:1.30-alpine 4003e5dbbc4f16b416eb472bb5e5fc3ed0e45402924b1752c66b48c764046d79 $ ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.1 22576 13204 ? Ss 09:00 0:01 /sbin/init root 812 0.1 0.4 2433024 71236 ? Ssl 09:00 0:03 /usr/bin/containerd root 1044 0.1 0.6 3354372 98472 ? Ssl 09:00 0:04 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock you 2201 0.0 0.0 11292 5376 pts/0 Ss 09:00 0:00 -bash root 5354 0.0 0.0 1238004 13056 ? Sl 09:00 0:00 /usr/bin/containerd-shim-runc-v2 -namespace moby -id 4003e5dbbc4f16b416eb472bb5e5fc3ed0e45402924b1752c66b48c764046d79 -address /run/containerd/containerd.sock root 5387 0.0 0.0 9876 6012 ? Ss 09:00 0:00 nginx: master process nginx -g daemon off; 101 5434 0.0 0.0 9876 6012 ? S 09:00 0:00 nginx: worker process 101 5435 0.0 0.0 9876 6012 ? S 09:00 0:00 nginx: worker process 101 5436 0.0 0.0 9876 6012 ? S 09:00 0:00 nginx: worker process 101 5437 0.0 0.0 9876 6012 ? S 09:00 0:00 nginx: worker process you 5439 0.0 0.0 13840 4608 pts/0 R+ 09:00 0:00 ps aux

      Your laptop~/kitchen

      • No open hatches

      Lunchboxes (containers)

      • No containers yet

      Frozen packs (images)

      • nginx:1.30-alpine8 layers · 93.5MB

      0 containers (0 running), 1 images, 0 lockers.

      Look near the bottom: nginx runs as a process on the laptop. World D6 shows how Docker fences it in.

      Real rep (optional): on your computer, type ls -l, then echo $HOME, then ls nope and echo $?.