Home Linux Administration How To Install Development Tools In Linux

How To Install Development Tools In Linux

By sk
28.7K views

In this tutorial, we will be discussing what are Development tools, why we need them, and how to install development tools in Linux distributions such as Arch Linux, CentOS, RHEL, Fedora, AlmaLinux, Rocky Linux, Debian, Ubuntu, and openSUSE etc.

What are Development Tools?

Development tools are essential for compiling, building, and installing software from source code. These development tools include all necessary applications, such as GNU GCC C/C++ compilers, make, debuggers, man pages and others which are needed to compile and build new software and packages.

Here’s a detailed explanation of their purposes and roles:

Purpose of Development Tools

1. Compilation:

  • Compilers: Convert human-readable source code (written in languages like C, C++, etc.) into machine-readable binary code that can be executed by the computer’s CPU. The GNU Compiler Collection (GCC) is a common compiler used for this purpose.
  • Preprocessors: Process directives in the source code before actual compilation starts. They handle tasks like including files, macro substitutions, etc.

2. Building:

  • Make: A build automation tool that reads a Makefile to determine how to compile and link the program. It ensures that only the necessary parts of the program are recompiled, saving time during the build process.
  • Linkers: Combine multiple object files (compiled source code) into a single executable program or library. This step resolves references between different parts of the program.

3. Libraries and Headers:

  • Development Libraries: Provide pre-written code that developers can use to handle common tasks (e.g., handling network connections, file I/O, etc.). These libraries often come with associated header files that declare the functions and structures available in the library.
  • Header Files: Contain declarations for functions, macros, and data structures used in the program. They are included in source files to provide the necessary declarations for the compiler.

4. Configuration:

  • Autoconf: A tool for producing configure scripts that automatically adapt the software to various types of systems. The configure script checks the system environment and sets up the necessary build options.
  • Automake: Generates Makefile.in templates for use with autoconf. It simplifies the writing of Makefile templates that are portable across different systems.

5. Debugging and Profiling:

  • Debuggers: Tools like GDB (GNU Debugger) help developers find and fix bugs in their programs by allowing them to inspect the state of the program at runtime, set breakpoints, and step through code.
  • Profilers: Tools that analyze the program’s performance, helping developers identify bottlenecks and optimize the code.

Examples of Development Tools

  • GNU Compiler Collection (GCC): A suite of compilers for various programming languages, including C and C++.
  • Make: A build automation tool that reads Makefile to compile and link the program.
  • GDB: The GNU Debugger for debugging programs.
  • Autoconf and Automake: Tools for generating portable build scripts and makefiles.
  • Pkg-config: A helper tool used when compiling applications and libraries to manage library paths and dependencies.
  • Development Libraries: Such as libssl-dev (for SSL/TLS support), zlib1g-dev (for compression), and others.

Why Development Tools Are Needed

When you install software from source, you start with raw source code files. The development tools perform the following tasks to convert these files into a working program:

1. Prepare the Build Environment:

Tools like autoconf and automake prepare the build environment by generating necessary configuration scripts and makefiles.

2. Compile Source Code:

The compiler translates source code into object files.

3. Link Object Files:

The linker combines object files into an executable program or a library.

4. Install the Program:

The make install command copies the compiled program and its related files to the appropriate directories on the system.

Hope you got a basic understanding of Development tools. Let us now see how to install them in various Linux distributions.

Install Development Tools in Linux

The developer tools can be installed either individually one by one or all at once. We are going to install all at once to make things much easier.

1. Install Development Tools in Arch Linux and Derivatives

To install development tools in Arch Linux and its derivatives like EndeavourOS and Manjaro Linux, just run:

$ sudo pacman -Syyu
$ sudo pacman -S base-devel

The above command will install the following package(s) in your Arch-based systems.

  1. autoconf
  2. automake
  3. binutils
  4. bison
  5. fakeroot
  6. file
  7. findutils
  8. flex
  9. gawk
  10. gcc
  11. gettext
  12. grep
  13. groff
  14. gzip
  15. libtool
  16. m4
  17. make
  18. pacman
  19. patch
  20. pkg-config
  21. sed
  22. sudo
  23. texinfo
  24. util-linux
  25. which

Just hit ENTER to install all of them.

Install Development Tools In Arch Linux
Install Development Tools In Arch Linux

If you want to install to a specific package group, just type its number and hit ENTER to continue installation.

2. Install Development Tools in Fedora, RHEL, CentOS, AlmaLinux, Rocky Linux

To install development tools in Fedora, RHEL and its clones such as CentOS, AlmaLinux and Rocky Linux, run the following commands as root user.

$ sudo dnf update
$ sudo dnf groupinstall "Development Tools"

Install Additional Libraries:

$ sudo dnf install openssl-devel zlib-devel

On RHEL 7 and older versions, use the following commands:

$ sudo yum update
$ sudo yum groupinstall "Development Tools"

The above command is going to install all necessary developer tools, such as:

  1. autoconf
  2. automake
  3. bison
  4. byacc
  5. cscope
  6. ctags
  7. diffstat
  8. doxygen
  9. elfutils
  10. flex
  11. gcc/gcc-c++/gcc-gfortran
  12. git
  13. indent
  14. intltool
  15. libtool
  16. patch
  17. patchutils
  18. rcs
  19. subversion
  20. swig
Install Development Tools In RHEL, CentOS, AlmaLinux, Rocky Linux
Install Development Tools In RHEL, CentOS, AlmaLinux, Rocky Linux

Install Additional Libraries:

$ sudo yum install openssl-devel zlib-devel

3. Install Development Tools in Debian, Ubuntu and Derivatives

To install required developer tools in Debian-based systems, run:

$ sudo apt update
$ sudo apt install build-essential

This command will all necessary packages to setup the development environment in Debian, Ubuntu and its derivatives.

  1. binutils
  2. cpp
  3. gcc-5-locales
  4. g++-multilib
  5. g++-5-multilib
  6. gcc-5-doc
  7. gcc-multilib
  8. autoconf
  9. automake
  10. libtool
  11. flex
  12. bison
  13. gdb
  14. gcc-doc
  15. gcc-5-multilib
  16. and many.
Install Development Tools In Debian, Ubuntu
Install Development Tools In Debian, Ubuntu

Depending on the software, you might need other libraries. Common ones include libssl-dev, zlib1g-dev, etc.

$ sudo apt install libssl-dev zlib1g-dev

You now have the necessary development tools to develop a software in your Linux box.


If you don't like this method to install the development tools, there is also a script named “mangi script” available to easily setup development environment in DEB based systems such as Ubuntu, Linux Mint and other Ubuntu derivatives. For more details, refer the following guide.


4. Install Development Tools in openSUSE/SUSE

To setup development environment in openSUSE and SUSE enterprise, run the following commands as sudo or root user:

$ sudo zypper refresh
$ sudo zypper update
$ sudo zypper install -t pattern devel_C_C++

Verifying Installation

Now, Let us verify the development tools have been installed or not. To do so, run:

$ gcc -v
$ make -v
Verify if the development tools are installed
Verify if the development tools are installed

As you see in the above output, the development tools have been successfully installed in Linux. Start compiling your applications from source code!

You May Also Like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

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

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More