Here are the most practical ways to install Code::Blocks (the popular open-source C/C++/Fortran IDE) on Ubuntu 24.04 LTS.
This gets you a stable, well-tested version quickly via the official Ubuntu universe repository.
sudo apt update
sudo apt install build-essential
sudo apt install codeblocks codeblocks-contrib
* codeblocks-contrib adds many useful plugins (recommended).
codeblocksCode::Blocks 25.03 (released ~2025) has better C++23/26 support and newer compiler integrations. The official binaries (built for Debian 11/12) usually work on Ubuntu 24.04.
sudo apt install ./codeblocks_25.03-*.deb
sudo apt install ./codeblocks-contrib_25.03-*.deb # if you downloaded it
Or double-click the .deb file → open with "Software Install" / "App Center".
Great if you prefer sandboxing or want the absolute latest builds.
# If you don't have Flatpak yet:
sudo apt install flatpak
# Add Flathub (most popular repo)
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# Install Code::Blocks
flatpak install flathub org.codeblocks.codeblocks
# Run it
flatpak run org.codeblocks.codeblocks
| Method | Version | Pros | Cons | Command line one-liner |
|---|---|---|---|---|
| Ubuntu repo | ~20.03 | Fastest, most stable integration | Older version | sudo apt install codeblocks codeblocks-contrib |
| Official .deb | 25.03 (2025) | Newest stable features | Manual download | (download → double-click or dpkg) |
| Flatpak | Latest | Always fresh, sandboxed | Slightly slower startup | flatpak install flathub org.codeblocks.codeblocks |
Most users on Ubuntu 24.04 start with Option 1 (simple apt install) and upgrade later only if they really need C23/C++26 features or newer debugger support.