How to install Code Blocks in Ubuntu Linux

In this article, we will discuss How to install Code Blocks in Ubuntu Linux. Code blocks are free and open-source applications, platforms for coding, C ++, etc. These are code blocks, all major operating systems ie Linux, Microsoft Windows, macOS, Solaris, OpenBSD, etc. There is a cross-platform application available. This application was developed by the Code Blocks team in the year 2005 under the GLN GPLV3 license. The latest version of Code blocks available on the official website is Code Blocks, which was released on January 28, 2016.

Follow the below steps to install Code Blocks in Ubuntu Linux:

Before installing the code blocks, we will need to install the required PPA repositories. To do so follow the command below.

itsmarttricks@mangesh:~$ sudo add-apt-repository ppa:damien-moore/codeblocks-stable
[sudo] password for itsmarttricks:
Current stable version of Code::Blocks IDE (16.01)

To install Code::Blocks from this PPA, open a terminal and type:

sudo add-apt-repository ppa:damien-moore/codeblocks-stable
sudo apt-get update
sudo apt-get install codeblocks codeblocks-contrib
More info: https://launchpad.net/~damien-moore/+archive/ubuntu/codeblocks-stable
Press [ENTER] to continue or Ctrl-c to cancel adding it.

Ign:1 cdrom://Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725) bionic InRelease
Err:2 cdrom://Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725) bionic Release

After installing the PPA repository for the code block, update the packages and repositories using the following command.

itsmarttricks@mangesh:~$ sudo apt-get update
Ign:1 cdrom://Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725) bionic InRelease
Err:2 cdrom://Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725) bionic Release
Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:4 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:5 http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu bionic InRelease
Hit:6 http://download.virtualbox.org/virtualbox/debian bionic InRelease

Also Read- How To Install Python 3.6 on Linux Using Terminal Interface

Now we are ready to install Code Blocks package. So let’s go ahead and install the same using the below command.

itsmarttricks@mangesh:~$ sudo apt-get install codeblocks
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
atril-common fonts-mathjax libatrildocument3 libatrilview3
libcaja-extension1 libjs-mathjax libmng2 libmysqlclient20 libqt4-dbus
libqt4-declarative libqt4-network libqt4-script libqt4-sql libqt4-sql-mysql
libqt4-xml libqt4-xmlpatterns libqtcore4 libqtdbus4 libqtgui4 libunibreak1
libzlcore-data libzlcore0.13 libzltext-data libzltext0.13 libzlui-qt4
linux-image-unsigned-4.15.0-34-generic
linux-image-unsigned-4.15.0-45-generic linux-modules-4.15.0-34-generic
mate-desktop-common mysql-common qdbus qt-at-spi qtchooser qtcore4-l10n
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
codeblocks-common libcodeblocks0 libutempter0 xterm
Suggested packages:
libwxgtk3.0-dev codeblocks-contrib xfonts-cyrillic
The following NEW packages will be installed:
codeblocks codeblocks-common libcodeblocks0 libutempter0 xterm
0 upgraded, 5 newly installed, 0 to remove and 62 not upgraded.
Need to get 6,958 kB of archives.
After this operation, 22.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 libcodeblocks0 amd64 16.01+dfsg-2.1 [1,943 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 codeblocks-common all 16.01+dfsg-2.1 [2,490 kB]

As you can see above we have successfully installed the Code Blocks package. Now to confirm the same use the below command.

itsmarttricks@mangesh:~$ sudo dpkg -l codeblocks
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii codeblocks 16.01+dfsg-2 amd64 Code::Blocks integrated developme

Also Read- How to install DrPython Text Editor in Ubuntu Linux

Now to open the Code Blocks application just type the command codeblocks on the shell prompt. Refer to the command below.

itsmarttricks@mangesh:~$ codeblocks

The snapshot is showing the below-installed compiler, so click OK to continue.

How to install Code Blocks in Ubuntu 18.04
Code Blocks

Now you can see the Code Blocks application snapshot below.

How to install Code Blocks in Ubuntu 18.04
Code Blocks

You can also open the Code Blocks application graphically using Search your Ubuntu Applications box. Refer to the snapshot below.

How to install Code Blocks in Ubuntu 18.04
Code Blocks Application

Also Read- How to install Tilix GTK 3 Tiling Terminal Emulator in Ubuntu Linux

How To Uninstall Code Blocks in Ubuntu Linux?

For any reason, if you don’t like Code Blocks Application and want to uninstall the application from your system using the following command.

itsmarttricks@mangesh:~$ sudo dpkg -r codeblocks
[sudo] password for itsmarttricks: 
(Reading database ... 201151 files and directories currently installed.)
Removing codeblocks (16.01+dfsg-2.1) ...
Processing triggers for shared-mime-info (1.9-2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...

That’s all, In this article, we have explained How to install CodeBlocks in Ubuntu Linux. I hope you enjoy this article. If you like this article, then just share it. If you have any questions about this article, please comment.

Share this:
WhatsApp Channel Join Now
Telegram Channel Join Now
Instagram Channel Join Now

1 thought on “How to install Code Blocks in Ubuntu Linux”

Leave a Comment

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