The main difference between these two arises in the fact that IDEs are programs that are a complete package, having many more features and functionalities than text editors. These additional features include integrated debuggers and compilers for compiling and debugging code. IDEs are also usually language-specific, meaning that they only specialize in certain languages, unlike text editors, which adopt a more flexible and broader approach.
Being free and extremely extensible and customizable, Linux is now being heavily relied upon in the programming industry. It is therefore imperative to choose a Linux-based IDE that provides users with the best features and allows them to complete their work in the most efficient manner. When talking about good editors, KDevelop, the cross-platform, free, and open-source IDE developed by KDE, is a top name mentioned in this category.
This article will show you how to install KDevelop onto your Ubuntu 20.04 system. The article will also provide a glance at the features offered by KDevelop IDE.
What is KDevelop?
Features like syntax highlighting, project management for different project types such as CMake or Qmake, automatic code completion, and support for multiple version-control systems such as Git, clearly indicate the powerful nature that lies at the core of KDevelop. Moreover, KDevelop comes with a large plugin architecture, providing users access to some fascinating additional functionalities, such as regular expression search. All of these features make KDevelop a proud product of the KDE community.
Ubuntu offers two ways for users to install KDevelop on their system. The following sections will show you how to install KDevelop on your system using these two methods.
a) Installing KDevelop Using the Official Ubuntu Repository
KDevelop is included in the package management system of Ubuntu as part of its official repository. Thus, KDevelop can be installed easily in Ubuntu using the apt command.
However, before you install KDevelop, you must first run the update command so that the apt-cache and packages are updated to the latest version. This prevents any issues from arising later in the installation.
To update the apt-cache and packages, open the terminal by hitting Ctrl+Alt+T or by searching ‘terminal’ in the Ubuntu Dash. Then, enter the following command in the terminal:
KDevelop can now be installed by entering the following command in the terminal:
$ sudo apt-get install kdevelop
b) Installing KDevelop Using the AppImage
An easier way of installing KDevelop is by using its AppImage. AppImages are packaging applications that can be run on Linux without having to install them. They offer an installation process similar to that of applications in Windows and macOS. To install the AppImage of KDevelop, open the official website of the program, and choose the ‘Download’ selection from the landing page. Click on the highlighted text mentioning ‘AppImage,’ and this will download the application onto your system.
If you are more comfortable with the command-line interface, you can also run the following command to download the KDevelop AppImage onto your system:
$ wget -O KDevelop.AppImage https://download.kde.org/stable/kdevelop/
After KDevelop has been downloaded, open the directory path of the download file and make it executable by running the following command:
$ chmod +x KDevelop-Version.AppImage
In my case, the command would be as follows:
$ chmod +x KDevelop-5.5.2-x86_64.AppImage
Now, double-click on the AppImage file, click ‘Execute’ in the prompt, and KDevelop will start.
Using KDevelop IDE
The world inside KDevelop is divided into two primary functions – sessions and projects. Sessions are batches that contain sets of projects that are similar to one another. For example, if you are working on two different operating systems, then you can make different sessions for each system. Projects, on the other hand, are blueprints that have access to all the files and folders.
To start a session, go to the ‘Session’ drop-down tab and click ‘Start New Session.’ This will open a new window in KDevelop, indicating the start of a session. It is important to note that the default session runs upon startup if you do not start a new session.
KDevelop also allows you to create new projects and open existing projects. You can either open projects by fetching the file directly from the version control, or by opening a project stored on your local hard drive. To create a project from scratch, click the ‘New from Template’ menu item.
Once you are done opening or creating your project, you can start working with your source code. Use the tools in the sidebar to help deal with classes, files present in the project, and file directories.
To run your program to test it, you will first need to build your program. This can be done by clicking the ‘Build’ button.
To run the program, open the ‘Run’ menu, and select ‘Launch Configurations.’ Here, click ‘Add_New.’ If your build was successful, then your project name will be displayed here. Click on the project name.
Next, click ‘OK’ to finish the prompt. Finally, once again, go to the ‘Run’ menu and click ‘Debug Launch.’
This will produce the output of your program.
Why Use KDevelop?
KDevelop is a powerful IDE that contains a large ecosystem for plugins, as well as numerous features of high standards and quality. Due to its stability and reliability, KDevelop is an excellent choice of IDE for Linux users.