Before writing C code, you need to understand programming logic, variables, data types, and the basics of using the terminal and an editor. In this episode you will also set up the gcc or clang compiler, build tools, a debugger, and verify your toolchain for the first time.

Welcome to the Learn C Language series! This series will take you from mastering the C language — the language that serves as the foundation of Unix, Linux, kernels, and almost all modern operating systems — from basic syntax to systems programming, networking, and embedded. There are 24 episodes organized into six phases.
But before writing a single line of code, there are some basic skills and software you must have. Why are these prerequisites important? Because C gives you full control over memory and hardware. Without an understanding of variables, pointers, and how memory works, all C code will feel confusing.
This episode 0 is your roadmap: we will ensure your basic skills, set up the gcc or clang compiler, build tools, debugger, editor, and perform your first compilation. Once this episode is done, the rest of the series can be followed comfortably.
C is a procedural language, so you need to be comfortable thinking in a sequence of steps. Master the concepts of if, loops, and functions from any language you've learned before. Understanding basic algorithms like finding the largest value in an array will help a lot in episode 9 later.
Understand that a program works with data: data is stored in variables, processed with operators, and grouped into functions. In C, every variable must have an explicit type, such as int for whole numbers and double for fractional numbers. This concept is non-negotiable because it directly determines how many bytes of memory are used.
Get comfortable with the command line. C compilation cannot be separated from the terminal, because we will run gcc and make there. Choose one editor you're comfortable with: VS Code, Vim, or Neovim. Finally, understand the principles of memory: the stack for local variables, the heap for dynamic allocation, and pointers that store memory addresses.
which code vim nvim nano 2>/dev/null
echo "$SHELL"The command echo "$SHELL" above shows your active shell. Don't panic if not all editors are installed; one editor you truly master is far better than five you only half-know.
The compiler is the heart of the C ecosystem. It translates source code into machine code. Three main options:
In this series we focus on GCC and Clang because both are cross-platform and open-source.
Besides the compiler, prepare make or cmake for build automation, GDB or LLDB as your debugger, and one editor. GDB is very important because it will be used in episode 11 to track down bugs. The hardware needed is simple: a laptop with at least 4 GB of RAM is enough for the entire series.
On Debian- or Ubuntu-based distributions, install all components at once:
sudo apt update
sudo apt install -y build-essential gdb clang make valgrindThe build-essential package brings gcc, g++, make, and basic libraries. valgrind will be used in episodes 7 and 17 to detect memory leaks.
Make sure all software is installed by checking its version:
gcc --version
clang --version
make --version
gdb --version
valgrind --versionEach command above must display its respective version. If any is not found, repeat the installation step.
Tip
If you are using Windows, enable Windows Subsystem for Linux and install the Ubuntu distribution, then run the commands above inside it. An alternative is to install MinGW-w64 and add it to your PATH.
Create a file named hello.c with your editor, then write the following code:
cat > hello.c <<'EOF'
#include <stdio.h>
int main(void) {
printf("Halo, dunia C!\n");
return 0;
}
EOF
gcc hello.c -o hello
./helloThe output Halo, dunia C! confirms your toolchain is working perfectly. The program above uses the printf function from the standard library and returns 0, indicating success.
Before moving on, run a final verification to make sure everything is ready:
which gcc clang make gdb valgrind
gcc hello.c -Wall -o hello && ./helloThe -Wall flag in gcc hello.c -Wall -o hello enables all common warnings. Getting into the habit of enabling -Wall from the start will save you from many subtle bugs in the episodes ahead.
A summary of the prerequisites you've prepared in episode 0:
hello.c compiled and ran without errors.If anything is still missing, stop and complete it before continuing. A strong foundation will make the next 23 episodes feel much lighter.
Key takeaways:
In the next episode 1 we will discuss the history, background, and why you need C — from C's birth at Bell Labs by Dennis Ritchie, its role in developing Unix, to the evolution of the ANSI C, C89/C90, C99, C11, C17, and C23 standards. Make sure your environment is ready, because the Learn C Language journey is just beginning!