How to install a C compiler
Choose a compiler
GCC and Clang both support standard C. The command is usually gcc or clang; either is suitable for this course.
Install on Linux
Use your distribution's development package, which normally includes a compiler, linker, and standard headers.
sudo apt update
sudo apt install build-essential
# Fedora alternative:
sudo dnf group install "Development Tools"
Install on macOS or Windows
On macOS, run xcode-select --install for Clang. On Windows, install MSYS2 and its UCRT64 GCC toolchain, then use the UCRT64 terminal.
# macOS:
xcode-select --install
# MSYS2 UCRT64 terminal:
pacman -S mingw-w64-ucrt-x86_64-gcc
Verify the installation
Open a new terminal and print the compiler version. A version banner confirms that the executable is on your PATH.
gcc --version
# or:
clang --version