How to Install CodeBlocks IDE on macOS and Linux: A Step‑by‑Step Guide
This article explains how to set up the open‑source C/C++ IDE CodeBlocks on both macOS and Linux, covering prerequisite installations, downloading the binary package, configuring system permissions, and using terminal commands to install the stable version on Ubuntu.
Reading font
CodeBlocks is a lightweight open‑source C/C++ integrated development environment (IDE) that supports editing, compiling, debugging, and offers features such as cross‑platform compatibility, multiple compiler support, a plugin framework, simple runtime, rapid updates, and an embedded wxWidgets GUI designer.
Below are the installation steps for macOS and Linux.
Installing CodeBlocks on macOS
First install Xcode from the App Store, then download the Apple Command‑Line Tools (GCC) from the Apple Developer site and install the resulting .pkg file.
Next, download the binary distribution from codeblock.org, extract it, move the application to the Applications folder, and grant the necessary permissions in System Preferences → Security & Privacy → General.
If the app cannot open, allow installations from “any source” in the Security settings. After these steps, CodeBlocks is ready on macOS.
Installing CodeBlocks on Linux/Ubuntu
CodeBlocks is available in the Ubuntu repositories. Open a terminal and run the following commands:
sudo add-apt-repository ppa:damien-moore/codeblocks-stable
sudo apt update
sudo apt install codeblocks codeblocks-contribAfter the commands finish, CodeBlocks is installed on Linux.
For questions about attribution, corrections or content rights, please contactand we will review it promptly.