Learn the steps to install CodeBlocks IDE in Ubuntu 22.04 LTS Jammy JellyFish Linux or 20.04 Focal fossa to code in a flexibly extensible environment for C, C++, or Fortran.
What is Code::Blocks?
With “Code::Blocks”, programmers will have an open source development environment for the programming languages C and C++.
The tool is highly extensible due to its Plug-ins system, but also brings a lot with it: Predefined projects, a class browser, and syntax highlighting are included, but by far not everything. For example, “Code::Blocks” supports several compilers and also provides numerous debugging options.
As an open source IDE, Code::Blocks first appeals to software developers who are looking for a powerful, but also flexibly extensible environment for C, C++, or Fortran. Written in C++, C and C++ developers are part of the core group that uses this development environment that is freely available under GPLv3. Code::Blocks also gives the software developer great freedom with regard to operating systems and compilers. Implemented with wxWidgets, the environment runs under Linux and macOS as under Windows. In addition to GCC and Visual C++, Clang and Borland C++ are also among the compilers that can be used.
Steps to install CodeBlocks IDE on Ubuntu 22.04 or 20.04 LTS
Here we will discuss different methods to install Code Blocks easily on Ubuntu 22.04/20.04. Choose the one as per your choice.
#1st Method using the APT package manager
1. Update Ubuntu 22.04 or 20.04
Let’s first step start with the updating of our Ubuntu system where you are planning to install Code::Blocks. Another reason for running the system update command is it will also refresh the APT package index cache.
sudo apt update && sudo apt upgrade
Also, run this command to install an open-source compiler GCC.
sudo apt install g++
2. Install CodeBlocks on Ubuntu 22.04 or 20.04
The best way to install CodeBlocks on Ubuntu 22.04 is to use its native package manager that is APT. Also, this open-source IDE is available through the system repository. Hence, no need to add any third-party repository.
sudo apt install codeblocks

3. Code::Blocks IDE Plugins
To have more features through this IDE you can install some additional plugins available through the packages called codeblocks-contrib
.
sudo apt install codeblocks-contrib

#2nd Method – Using GUI Software Manager
4. Open Ubuntu Software Manager
Another easy way to get the Codeblock is to use the GUI interface of the Software manager app. This method doesn’t involve any type of command, hence beginners friendly as well.
- From the Ubuntu Dock, click on the “Ubuntu Software” icon.
- Click on the Search icon.
- Type- Codeblocks
- As the IDE appears in the results, click to open it.

Now, again click the Install button to configure the Codeblocks on your Ubuntu Linux system.

#3rd method using Flatpak
5. Install Flatpak
Well, if both of the above-given methods are not working for you then use the Flatpak. It is a universal package manager that we can use to easily install using the default system repository of Ubuntu 22.04 or 20.04.
sudo apt install flatpak
After installing the Flatpak, add its FlatHub repository as well.
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Once you have added the repo, restart your PC to integrate the Flatpak properly into the system.
sudo reboot
6. Setup IDE using Flatpak on Ubuntu 20.04 0r 22.04
Now, run the given command to install the Code::block IDE on the Ubuntu 22.04 or 20.04 system. One of the benefits is, Flatpak will install the software in an isolated environment.
flatpak install flathub org.codeblocks.codeblocks

7. Run this open-source IDE
Once the installation is completed, go to the All Application launcher and there search for the CodeBlocks, as its icon appears click to run the same. Alternatively, open your terminal and type:
codeblocks &
As you run it the first time, software (IDE) will detect the available compiler on your system. Select the default one if you have multiple compilers and click on the OK button.
8. How to update
As we have used multiple methods to install Codeblocks, hence use the update method corresponding to them, given below:
For Apt users:
sudo apt update & sudo apt upgrade
For Flatpak:
flatpak update
For GUI Software manager:
Simply open the Software manager, search for Codeblocks, open it and click on the update button, which only shows when the updates would be available.
9. Uninstall or remove Codeblocks from Ubuntu
Finally, those who, after using the Code::blocks didn’t like it and wanted to remove the IDE can take the help of given commands.
For APT
sudo apt autoremove --purge codeblocks
For Flatpak
flatpak uninstall --delete-data org.codeblocks.codeblocks
To remove the unwanted residual files as well, use:
flatpak remove --unused
FAQ
To install CodeBlocks on Ubuntu Linux, simply open your command terminal and run the given command- sudo apt install codeblocks codeblocks-contrib
Yes, Clodeblocks is available via the Ubuntu system repository, hence we can install it using the command terminal or GUI software manager.
Code::Blocks is a free, open-source cross-platform IDE available for Windows, macOS, and Linux that supports multiple compilers including GCC, Clang, and Visual C++.
No, CodeBlocks is an IDE, not a Compiler. We can use it to write our codes and compile them with help of different compilers such as GCC installed on our system.
IDE stands for “Integrated development environment”. It is software for coding and building applications with the help of developers’ add-ons or tools integrated into a single graphical user interface (GUI).
Other Articles:
⇒ How to create, compile & run a C Program in a Linux terminal
⇒ How to install Rstudio Desktop or server in Debian 11 Bullseye Linux
⇒ Command to Install Android Studio on Ubuntu 20.04 Linux
⇒ 3 ways to Install NetBeans IDE on Ubuntu 22.04 or 20.04 LTS
⇒ How to install IntelliJ IDEA on Ubuntu 22.04 | 20.04 LTS