How to Install Code::Blocks on Ubuntu 20.04
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.
Install Code::Blocks on Ubuntu 20.04 using APT
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
Install CodeBlocks on Ubuntu from a Debian file
Once downloaded, run the Code:Blocks Debian file as shown.
sudo dpkg -i codeblocks_20.03-3_amd64.deb
install Code::Blocks using Debian file
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.
Search for Code::Blocks IDE
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’.
Compiler detected during installation
And finally, the Code::Blocks IDE interface will come into view as you can see below.
Code::Blocks IDE
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.
Did you find this article helpful?
We are glad you liked the article. Share with your friends.
Sorry about that.
How can we improve it?
Mục lục bài viết
About The Author
Winnie Ondara
Winnie is a Linux technical writer with over 3 years of experience with various Linux distributions and writing technical guides in Linux. She is passionate about FOSS technologies and always endeavor to learn new technologies. During my free time, I watch movies, listen to music, and catch up with tech news.