This guide will go through how to install code blocks on Ubuntu 22.04. Code::Blocks is a free, open-source cross-platform IDE that supports several compilers such as GCC, Clang and Visual C++. The GUI toolkit is wxWidgets, and it is created in C++. Its powers and features are determined by the available plugins using a plugin architecture.
Install Code Blocks on Ubuntu 22.04
Update your system packages.
sudo apt update
Then install Code Blocks on Ubuntu 22.04 using the following command.
sudo apt install codeblocks
Sample output
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
binutils binutils-common binutils-x86-64-linux-gnu
codeblocks-common gcc gcc-11 libasan6 libastyle3 libbinutils
libc-dev-bin libc-devtools libc6-dev libcc1-0 libcodeblocks0
libcrypt-dev libctf-nobfd0 libctf0 libgcc-11-dev libitm1
liblsan0 libnsl-dev libquadmath0 libtinyxml2.6.2v5
libtirpc-dev libtsan0 libubsan1 libutempter0 libwxbase3.0-0v5
libwxgtk3.0-gtk3-0v5 linux-libc-dev manpages-dev rpcsvc-proto
xterm
Suggested packages:
binutils-doc codeblocks-contrib libwxgtk3.0-dev gcc-multilib
make autoconf automake libtool flex bison gcc-doc
gcc-11-multilib gcc-11-doc gcc-11-locales glibc-doc
xfonts-cyrillic
The following NEW packages will be installed:
binutils binutils-common binutils-x86-64-linux-gnu codeblocks
codeblocks-common gcc gcc-11 libasan6 libastyle3 libbinutils
libc-dev-bin libc-devtools libc6-dev libcc1-0 libcodeblocks0
libcrypt-dev libctf-nobfd0 libctf0 libgcc-11-dev libitm1
liblsan0 libnsl-dev libquadmath0 libtinyxml2.6.2v5
libtirpc-dev libtsan0 libubsan1 libutempter0 libwxbase3.0-0v5
libwxgtk3.0-gtk3-0v5 linux-libc-dev manpages-dev rpcsvc-proto
xterm
0 upgraded, 34 newly installed, 0 to remove and 3 not upgraded.
Need to get 52.9 MB of archives.
After this operation, 173 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 binutils-common amd64 2.38-3ubuntu1 [221 kB]
Get:2 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 libbinutils amd64 2.38-3ubuntu1 [662 kB]
Get:3 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 libctf-nobfd0 amd64 2.38-3ubuntu1 [106 kB]
Get:4 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 libctf0 amd64 2.38-3ubuntu1 [103 kB]
Get:5 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 binutils-x86-64-linux-gnu amd64 2.38-3ubuntu1 [2,328 kB]
Get:6 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 binutils amd64 2.38-3ubuntu1 [3,186 B]
Get:7 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 codeblocks-common all 20.03-3.1 [3,751 kB]
Get:8 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 libastyle3 amd64 3.1-2build1 [104 kB]
Get:9 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 libtinyxml2.6.2v5 amd64 2.6.2-6 [33.0 kB]
Get:10 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 libwxbase3.0-0v5 amd64 3.0.5.1+dfsg-4 [881 kB]
Get:11 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 libwxgtk3.0-gtk3-0v5 amd64 3.0.5.1+dfsg-4 [4,368 kB]
Get:12 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 libcodeblocks0 amd64 20.03-3.1 [1,980 kB]
Get:13 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 codeblocks amd64 20.03-3.1 [1,822 kB]
Get:14 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 libcc1-0 amd64 12-20220319-1ubuntu1 [47.2 kB]
Get:15 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 libitm1 amd64 12-20220319-1ubuntu1 [30.2 kB]
Get:16 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 libasan6 amd64 11.2.0-19ubuntu1 [2,283 kB]
Get:17 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 liblsan0 amd64 12-20220319-1ubuntu1 [1,069 kB]
Get:18 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 libtsan0 amd64 11.2.0-19ubuntu1 [2,261 kB]
Get:19 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 libubsan1 amd64 12-20220319-1ubuntu1 [976 kB]
Get:20 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 libquadmath0 amd64 12-20220319-1ubuntu1 [154 kB]
Get:21 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 libgcc-11-dev amd64 11.2.0-19ubuntu1 [2,526 kB]
Get:22 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 gcc-11 amd64 11.2.0-19ubuntu1 [20.1 MB]
Get:23 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 gcc amd64 4:11.2.0-1ubuntu1 [5,112 B]
Get:24 http://ke.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libc-dev-bin amd64 2.35-0ubuntu3.1 [20.4 kB]
Get:25 http://ke.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libc-devtools amd64 2.35-0ubuntu3.1 [28.9 kB]
Get:26 http://ke.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-libc-dev amd64 5.15.0-47.51 [1,325 kB]
Get:27 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 libcrypt-dev amd64 1:4.4.27-1 [112 kB]
Get:28 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 rpcsvc-proto amd64 1.4.2-0ubuntu6 [68.5 kB]
Get:29 http://ke.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libtirpc-dev amd64 1.3.2-2ubuntu0.1 [192 kB]
Get:30 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 libnsl-dev amd64 1.3.0-2build2 [71.3 kB]
Get:31 http://ke.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libc6-dev amd64 2.35-0ubuntu3.1 [2,099 kB]
Get:32 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 libutempter0 amd64 1.2.1-2build2 [8,848 B]
Get:33 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 manpages-dev all 5.10-1ubuntu1 [2,309 kB]
Get:34 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 xterm amd64 372-1ubuntu1 [857 kB]
Fetched 52.9 MB in 3min 40s (241 kB/s)
Extracting templates from packages: 100%
Selecting previously unselected package binutils-common:amd64.
(Reading database ... 195915 files and directories currently insta
lled.)
After the installation, code blocks can be launched using the command below.
codeblocks
Alternatively, it can be launched from the application menu.

When launched select GCC compiler and click OK. Code blocks interface when launched.

How to Uninstall on Ubuntu 22.04
Remove Code Blocks from your system using the command below.
sudo apt purge --autoremove codeblocks
That concludes our article on how to install Code Blocks on Ubuntu 22.04. Cheers!
Read more about Code::Blocks




