YouTube Icon

Code Playground.

How to Install GCC Compiler on Debian 10 Linux


How to Install GCC Compiler on Debian 10 Linux

The GNU Compiler Collection (GCC) is an open-source assortment of compilers and libraries supporting C, C++, Objective-C, Fortran, Ada, Go, and D programming dialects. The Linux portion, the GNU utilities, and numerous different undertakings are assembled with GCC. 

This instructional exercise discloses how to introduce the GCC compiler on Debian 10, Buster. Similar guidelines apply for Debian 9 and any Debian-based circulation. 


To introduce bundles on your Debian framework, you should be signed in as a client with sudo advantages . 

Installing GCC on Debian

The default Debian vaults contain a meta-bundle named manufacture basic that contains the GCC compiler and different libraries and utilities needed for gathering programming. 

Follow the means beneath to introduce the GCC Compiler Debian 10: 

To start with, update the bundles list: 

sudo apt update

Introduce the manufacture basic bundle by running: 

sudo apt install build-essential

You may likewise need to introduce the manual pages that incorporates documentation about utilizing GNU/Linux for advancement: 

sudo apt-get install manpages-dev

To affirm that the GCC compiler is effectively introduced type gcc - variant: 

gcc --version

At the hour of composing this article, the default variant of GCC accessible in the Debian 10 storehouses is 8.3.0: 

gcc (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO

That is it. You have effectively introduced GCC on your Debian machine. 

Compiling a Hello World Example

Ordering an essential C or C++ program with GCC is pretty clear. Open your content tool and make the accompanying document: 

nano hello.c


#include <stdio.h>
int main()
  printf ("Hello World!\n");
  return 0;

Spare the document and utilize the accompanying order to aggregate it into an executable: 

gcc hello.c -o hello

The compiler will make a double record named hi in a similar catalog, where the order was executed. 

To execute the program run: 


The yield will resemble this: 

Hello World!


You have effectively introduced GCC on your Debian 10. For more data about GCC, visit the authority GCC Documentation . 

On the off chance that you hit an issue or have input, leave a remark beneath.