Written in C, Code::Blocks ( Yes, with a double full colon) is a free and opensource, cross-platform IDE for C, C++, and FORTRAN projects. It provides a very simple UI that makes it simple to navigate and create projects. It's quite easy to use and is made quite extensible using plugins.
The Code: Blocks IDE supports a wide range of compilers. These include the GNU GGC Compiler, LLVM Clang compiler, OpenWatcom, Digital Mars, and so many others.
There are mainly two ways to install Code::Blocks IDE on Ubuntu 20.04 and we cover both.
Method 1: Install Code::Blocks IDE using APT
Code::Blocks IDE is available on Ubuntu repositories and can be installed with the APT command. Installation from the default repository is the simplest method, But it may have bit older versions.
First update your system:
sudo apt update
To install codeblock on Ubuntu , run the following command:
sudo apt install codeblocks
When prompted to continue, just type 'Y' and press ENTER to proceed.
Method 2: Install Code::Blocks IDE using a Deb file
Alternatively, you can use a Deb file to install the IDE. First, download it as shown.
wget http://security.ubuntu.com/ubuntu/pool/universe/c/codeblocks/codeblocks_20.03-3_amd64.deb
Once downloaded, run the Code:Blocks Debian file as shown.
sudo dpkg -i codeblocks_20.03-3_amd64.deb
The latest code block binary is also available to download as compressed archives. Download tar.xz file and extract to get code blocks deb file.
Launching Code::Blocks IDE
To launch Code::Blocks IDE, search for it using the application manager as follows. Once the Code::Blocks IDE icon appears, click on it.
The autodetection of the compiler will take place, as the IDE requires a compiler to compile the source code. In this case, I already have the GCC compiler in place. Once the compiler has been successfully detected, click 'OK'.
And finally, the Code::Blocks IDE interface will come into view as you can see below.
Codeblock 20.03 is the available version at the time of writing this tutorial.
Remove Code::Blocks IDE
To remove codeblocks from ubuntu, run the following command:
sudo apt remove codeblocks
To complete remove codeblock and its associated configurations, run the following two commands:
sudo apt purge codeblocks
sudo apt autoremove
Conclusion
Though not as popular as other IDEs such as IntelliJ IDEA or Visual Code Studio, Code:Blocks IDE is a fairly decent IDE for your C and C++ projects. It's lightweight and fast and is ideal for beginners who are starting out in software development. We hope that you can comfortably install CodeBlocks IDEA on Ubuntu 20.04.
Comments