Home ALL POSTS How to Install GCC Compiler in Ubuntu

1 386

The GNU Compiler Collection (GCC) is a powerful compiler system that supports various programming languages including C and C++. The latest versions of Ubuntu does not have this by default. You can install it by following the 5 simple steps:

Step 1. First open the terminal and type “gcc” to check whether the package is already installed or not. If the package is already installed in your system, then you can start using it. Otherwise, follow the next steps.

Step 2. It is recommended to do a package update first, so that it will update package lists and all versions that matches with the latest version of GCC nicely. To update:

sudo apt-get update
sudo apt-get upgrade

Step 3. Installing the metapackage called build-essential is the best way to get GCC. It contains a list of packages which are essential for building Ubuntu packages including GCC compiler, make and other required tools. To install it, type in the terminal:

sudo apt-get install build-essential

Step 4. Accept the installation.

Step 5. To check the version of installed GCC compiler, type the following in the terminal:

gcc –version

Now you are all set to use the GCC compiler.

If you do not want to install the the whole build-essential metapackage, you can simply install only the GCC package by giving the following command in terminal:

sudo apt-get install gcc g++

1 COMMENT

  1. Good day! This is kind of off topic but I need some advice from an established blog.
    Is it difficult to set up your own blog? I’m not very techincal
    but I can figure things out pretty fast. I’m thinking about creating my own but I’m not sure where to begin.
    Do you have any tips or suggestions? Appreciate it

Leave a Reply


− 4 = 1