How to Install Code::Blocks IDE on Ubuntu 20.04

Code::Blocks is one of the available tools that offer everything one would need to get through all the stages of the development process. It is designed to be highly customizable, fully configurable and extensible, this IDE supports a variety of functions.

It is a free open-source C/C++, XML and Fortran IDE(Integrated Development Environment) built to meet the most demanding needs of its users.

Code::Blocks is developed in C++ using wxWidgets as the GUI toolkit. Using a plugin architecture, its capabilities and features are defined by the provided plugins and It’s an cross platform application available for Microsoft Windows, macOS and Linux.

Create applications and test them in an IDE that supports simple or advanced debugging for multiple programming languages like C, C++, and Fortran. It has a custom build system and optional Make support.

All the modules are highly configurable and the base functionality can be extended by using plug-ins without knowing advanced programming language. Any kind of functionality can be added by installing/coding a plugin. For instance, event compiling and debugging functionality is provided by plugins!

One feature that I particularly liked is the auto-detection of the installed on the computer compilers, so we are not forced to use any compiler in special, this is very useful on Linux environments.

And if you don’t get enough of the program itself, try the long list of plugins that can be installed! Auto versioning, code snippets, code stats, drag and scroll, and many more.

Key Features of Code::Blocks

  • Syntax highlighting, customizable and extensible through plugins
  • To-do list management with different users
  • Code folding for C, C++, Fortran, XML and many more files.
  • Tabbed interface
  • Class Browser
  • Code completion
  • Smart indent
  • Open files list for quick switching between files (optional)
  • One-key swap between .h and .c/.cpp files
  • Very fast custom build system
  • External customizable “Tools”
  • compiler supports: GCC (MingW / GNU GCC), MSVC++, clang, Digital Mars, Borland C++ 5.5, Open Watcom
  • Workspaces to combine multiple projects
  • Debugger

This article explains three methods of installing Code::Blocks IDE on Ubuntu 20.04.

Choose the installation method that is most appropriate for your environment.

Method 1: Installing Code::Blocks IDE using APT

In this method we will install the Code::Blocks via apt and the installation is very straightforward.

Step #1

Code::Blocks IDE is available in the universe repository of all Ubuntu releases.

Note: Though it is usually enabled by default, It won’t harm to enable universe repository first.

$ sudo add-apt-repository universe

Step #2

Then type the following command to update the package index.

$ sudo apt update && sudo apt upgrade

Step #3

Finally execute the following command to install Code::Blocks on Ubuntu.

$ sudo apt install codeblocks

Recommended: Install additional plugins to get more out of the Code Blocks IDE. You can install them using the codeblocks-contrib package.

$ sudo apt install codeblocks-contrib

At this step, you have successfully installed Code::Blocks IDE application on Ubuntu 20.04 system.

Method 2: Install Code::Blocks IDE using a deb file

Alternatively, you can use a .deb file to install the Code::Blocks IDE.

Step #1

Type the following command to download the .deb package with the help of wget command.

$ wget

Step #2

Once downloaded, execute the following command to install the Code:Blocks .deb package.

$ sudo dpkg -i codeblocks_20.03-3_amd64.deb

That’s It. Now you can open the Code::Blocks IDE application with the help of Activities search bar.

Method 3: Installing Code::Blocks via PPA

Personal Package Archives (PPA) are software repositories designed for Ubuntu users and are easier to install than other third-party repositories. PPAs are often used to distribute pre-release software so that it can be tested.

With the help of PPA, we can install Code::Blocks application easily. This method allows you to install the latest Code::Blocks version.

Step #1

First of all open the terminal from system application launcher and type the following command to add the Code::Blocks PPA to your system.

$ sudo add-apt-repository ppa:codeblocks-devs/release

Step #2

Then, execute the following commands to install Code::Blocks package on your Ubuntu system.

$ sudo apt update && sudo apt install codeblocks codeblocks-contrib

Once installed, launch it from your system application menu.

Starting Code::Blocks IDE

In the Activities search bar type “Code” and click on the icon to launch the application.

When you first start Code Blocks, it looks for all the available compilers on your system and adds it to the path, so you don’t have to configure it on your own.

In my case, I already had gcc installed on my Ubuntu system and it was well recognized by Code Blocks.

Code::Blocks user interface:

How to Uninstall Code::Blocks from Ubuntu 20.04

For some reason, If you want to uninstall Code::Blocks application, refer following commands.

Method #1

If you have installed Code::Blocks via apt type the following command:

$ sudo apt remove codeblocks

Type the following command to remove Code::Blocks completely and its associated configurations.

$ sudo apt purge codeblocks
$ sudo apt autoremove

Method #2

To remove the PPA repository, either go to Software & Updates -> Other Software, or run command in terminal.

$ sudo add-apt-repository --remove ppa:codeblocks-devs/release

And remove Code::Blocks:

$ sudo apt remove --autoremove codeblocks codeblocks-contrib


I hope that now you have a good understanding of How to Install Code::Blocks on Ubuntu 20.04 LTS Focal Fossa.

If anyone does have any questions about what we covered in this guide then feel free to ask in the comment section below and I will do my best to answer those.

If you like our content, please consider buying us a coffee.

Buy Me A Coffee

We are thankful for your never ending support.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.