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
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.
Hint
chmod +x cook.sh, then ./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.
Hint
export CHEF=Kancil, then echo $CHEF.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.
chmod +x lets a script run
You did it!
You can now read the five Linux words behind most container errors.
Go deeper (optional)
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 $?.
Bahasa Melayu
Skrip ini berhenti dengan Permission denied. Container ialah komputer Linux kecil. Jadi kebanyakan ralat container ialah ralat Linux. Lima perkataan Linux akan selamatkan anda.
Linux simpan fail dalam folder di dalam folder, macam balang atas rak. Alamat penuh sesuatu fail ialah path (laluan). Bina path ke menu, dari atas ke bawah.
Setiap fail ada permissions (kebenaran): r baca, w tulis, x jalankan. ls -l tunjukkannya. chmod +x cook.sh tambah kebenaran jalankan. Buat, kemudian jalankan ./cook.sh.
chmod +x cook.sh, kemudian ./cook.sh.Fail cuma duduk atas rak. Program yang sedang berjalan ialah process (proses). Setiap satu dapat nombor, iaitu PID. Fail atau process? Susun.
Environment variable (pemboleh ubah persekitaran) ialah nota lekat di dinding dapur. Setiap program yang anda mulakan boleh membacanya. Lekat satu dengan export. Baca dengan echo.
export CHEF=Kancil, kemudian echo $CHEF.Setiap process tamat dengan satu nombor: exit code (kod keluar). 0 bermaksud semua okey. Nombor lain bermaksud ada masalah. echo $? tunjuk yang terakhir. Tekan setiap exit code.
docker ps -a kata container anda Exited (1). Apa maksud nombor 1 itu?
Betul atau tidak? Leret ke kanan kalau ia betul.
Kini anda boleh baca lima perkataan Linux di sebalik kebanyakan ralat container.
You finished this before. Practice is always welcome!
Official docs: Ubuntu: the Linux command line for beginners · chmod manual · ps manual · Environment variables (environ)
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?