| by Arround The Web | No comments

How to Install GNU Debugger GDB on Linux Mint 21

GNU Debugger, commonly referred as GDB is a powerful and open-source debugging tool that can run on Linux and Unix-type operating systems. The GDB tool was specifically designed for C and C++ languages; due to its wide range of supportive languages, it can debug other languages as well like Ada, Fortran, Go, Pascal, and many others. It is used by developers to examine variables, calling functions, debug preprocessor macros, server-client debug architecture, and many other rich features that one can think of it.

Install GDB on Linux Mint 21

In Linux, we have two ways to install GDB on Linux Mint 21 system:

    • Using Terminal
    • Using GUI

Method 1: Install GDB Using Terminal

To follow the terminal approach, you must update the system repository first to let update all the packages:

$ sudo apt update

 

Now, run the following installation command to install GDB on Linux Mint 21 system:

$ sudo apt install gdb

 

Type the version command to check if your system has installed the GDB tool successfully:

$ gdb --version

 

To run GDB on your system through terminal, execute the following command:

$ gdb

 

You can also remove GDB from your system by executing the following command:

$ sudo apt remove gdb

 

Method 2: Install GDB Using GUI

Open the software manager, search for the GDB using the search bar, and hit the accurate output from the several results:


Click on the Install button to let it install on Linux Mint 21 system:


This requires sudo privileges as you can only get it if you’re working as super user. Type the Linux Mint password and click to Authenticate:


It will start installing the program after authentication:


The GDB tool is installed on your Linux Mint 21 system, click on the Launch button to open it on your system.


You can also remove it by hitting on the Remove button.

Conclusion

GDB is an open-source, popular and portable debugger tool used by developers to debug programs written in C, C++, FORTRAN, Go, Pascal, and many other languages. This tool also helps to trace instructions of programs and debug it. Using this guide, we have learned how to install GDB on Linux Mint 21 system using a terminal and GUI.

Share Button

Source: linuxhint.com

Leave a Reply