1. Home
  2. Linux
  3. Code blocks ide linux

How to install Code Blocks IDE on Linux

Code Blocks is a C++ IDE designed to be highly accommodating to the user. It has many useful features and is worth installing if you regularly work with C++ code on Linux. Here’s how to install Code Blocks on your system.

Ubuntu installation instructions

Ubuntu has support for Code Blocks via an official PPA. To enable this PPA, you must open up a terminal window on the Ubuntu desktop. You can open up a terminal window on the desktop by pressing Ctrl + Alt + T on the keyboard. Or, search for “Terminal” in the app menu.

With the terminal window open, run the add-apt-repository command to add the new Code Blocks software repository to Ubuntu.

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

Once you’ve added the software repository to your Ubuntu system, you will need to run the update command to refresh Ubuntu’s software sources. Using the apt update command below, refresh Ubuntu.

sudo apt update

Finally, once Ubuntu is up to date, you can install the Code Blocks IDE on your computer. First, using the apt install command, set up the program on Ubuntu.

sudo apt install codeblocks codeblocks-contrib

Debian installation instructions

Although Debian is very similar to Ubuntu, the PPA will not work with it. So instead, if you are using Debian and you want to use Code Blocks, you will have to download the packages from the official website.

Old Stable

If you’re using the old stable version of Debian Linux and need to install Code Blocks on your system, you will need to download the “Old Stable” DEB packages.

To get the packages, open up a terminal window on the desktop. Once the terminal window is open, use the wget download command to grab the packages.

wget https://www.fosshub.com/Code-Blocks.html?dwl=codeblocks_20.03_amd64_oldstable.tar.xz -O ~/codeblocks_20.03_amd64_oldstable.tar.xz

Once the packages are done downloading, extract the contents using the tar xvf command.

tar xvf codeblocks_20.03_amd64_oldstable.tar.xz

With the packages extracted, the installation of Code Blocks on Debian old stable can begin. Using the dpkg command below, install the software.

sudo dpkg -i *.deb

sudo apt-get install -f

Stable

If you’re using the current version of Debian, you’ll need to download and extract the Code Blocks packages to use the program. To install, open up a terminal window. Then, use the wget download command to grab the Code Blocks packages.

wget https://sourceforge.net/projects/codeblocks/files/Binaries/20.03/Linux/Debian%2010/codeblocks_20.03_amd64_stable.tar.xz -O ~/codeblocks_20.03_amd64_stable.tar.xz

Once the download is complete, extract the archive’s contents to access the Code Block DEB packages.

tar xvf codeblocks_20.03_amd64_stable.tar.xz

With everything extracted, install the software on your Debian system with the commands below.

sudo dpkg -i *.deb
sudo apt-get install -f

Arch Linux installation instructions

If you want to get the Code Blocks app working on your Arch Linux system, you’ll have to ensure the “Community” software repository is enabled. Once you do, open up a terminal window on the desktop.

With the terminal window open and ready to use, run the pacman -S command and install the “codeblocks” package to your system.

sudo pacman -S codeblocks

Arch Linux will ask you for a password upon entering the command above. Using the keyboard, enter your password. Then, press the Y button to confirm you wish to install the Code Blocks application on your Arch Linux computer.

Fedora installation instructions

Those on Fedora Linux will be able to install the Code Blocks application through the official software sources. However, you must be running Fedora 34 or higher. Open up a terminal window on the Fedora desktop by pressing Ctrl + Alt + T on the keyboard. Or, launch a terminal window by searching for “Terminal” in the app menu.

With the terminal window open, use the dnf install command to set up the “codeblocks” package.

sudo dnf install codeblocks

When you enter the command above, Fedora will ask you for your password. Using the keyboard, enter your user account password. After entering the password, Fedora will ask you to press Y to confirm you wish to install the program.

OpenSUSE installation instructions

The Code Blocks application is available for OpenSUSE users. To get the app working on your computer, start by opening up a terminal window. You can launch a terminal by pressing Ctrl + Alt + T on the keyboard. Or, search for “Terminal” window in the app menu.

With the terminal window open and ready to use, run the wget command and download the latest RPM packages to your system.

wget https://sourceforge.net/projects/codeblocks/files/Binaries/20.03/Linux/CentOS%207/codeblocks-20.03-1.el7.rmps.tar/download -O ~/codeblocks-20.03-1.el7.rmps.tar

With the packages downloaded, extract the tar file using the tar xvf command.

tar xvf codeblocks-20.03-1.el7.rmps.tar

To install Code Blocks on your OpenSUSE system, run the zypper install command.

sudo zypper install *.rpm

When you enter the command above, you’ll be asked to enter a password. Do so to get the packages installed.

Leave a Reply

Your email address will not be published. Required fields are marked *

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