How to Install GCC Compiler on Ubuntu

Prerequisites Te able to add new repositories and install packages on your Ubuntu system, you must be logged in as root or user with Sudo privileges. Installing GCC on Ubuntu The default Ubuntu repositories contain a meta-package named build-essential that contains the GCC compiler and a lot of libraries and other utilities required for compiling software. Perform the…

By.

min read


Prerequisites

Te able to add new repositories and install packages on your Ubuntu system, you must be logged in as root or user with Sudo privileges.

Installing GCC on Ubuntu

The default Ubuntu repositories contain a meta-package named build-essential that contains the GCC compiler and a lot of libraries and other utilities required for compiling software.

Perform the steps below to install the GCC Compiler in any version of Ubuntu:

  1. Start by updating the packages list:
$ sudo apt update
  1. Install the build-essential package by typing:
$ sudo apt install build-essential

The command installs a bunch of new packages including gccg++ and make.

You may also want to install the manual pages about using GNU/Linux for development:

$ sudo apt-get install manpages-dev
  1. To validate that the GCC compiler is successfully installed, use the gcc --version a command which prints the GCC version:
This 2 commands are same:
$ gcc --version 
$ gcc -v

That’s it. GCC is now installed on your system, and you can start using it.


3 responses to “How to Install GCC Compiler on Ubuntu”

  1. Shantha Avatar
    Shantha

    Great work, Thank you !!

  2. […] How to Install GCC Compiler on Ubuntu […]

  3. […] How to Install GCC Compiler on Ubuntu […]

Leave a Reply

Your email address will not be published. Required fields are marked *

en_US