GCC is regarded as an indispensable component in the all-inclusive compiler of GNU. It is an aggregation of depository pertinent to the language of programming. The languages inclusive in the GCC are C, Fortran, Go, C , Objective C- and various other essential languages. The GCC is reckoned as a build-essential because it manifests various other operating tools for open sources. You can consider it as a chief process for the well-versed operating systems, including Linux. It is a compiler because it inhibits the libraries for the programing language, that ease the accessibility of those languages in commands. GCC compiler is also a credential for the Linux kernel along with some primary instruments of GNU. This guide follows a very elementary procedure in terms of programming to successfully install the GCC compiler on ubuntu 20.04. once you are done installing, you can palpably induce the system for the compilation of the programming languages.

Prerequisites

Equivalent to the installation of other packages on ubuntu, GCC also postulates some prerequisites before installing it on ubuntu 20.04. Those requirements encompass the availability of enough space for some latest binary files. Also, it is an inherent requirement for any form of installation to log-in the system via root user or through the user entailing the sudo privileges.

Installation Procedure

It has become excessively quick to download the GCC compiler on ubuntu. The reason is justified by the fact that the Linux system’s depository also contains the packages for build-essentials. Through these packages, you can conveniently download the GCC compiler. Primarily you can find these packages in the repository through the meta-package. If you want to access the GCC compiler after a convenient installation, then you should opt for the development package. That will assist you in downloading all the build-essentials of GCC in your system in a single go.

Installation Steps

You can achieve the successful installation of GCC in your ubuntu by three major steps. These steps are so easy that even if you are a beginner, you can handily use the commands for an effective installation. The steps for the installation of the GCC compiler on your Ubuntu 20.04 are as follows.

System Package updating.

Installation of the development package.

Downloading of manual pages (optional).

Verification of GCC.

System Packages Updating

In this step, use the simple and fundamental sudo commands to update and upgrade your existing packages. By inputting these commands, you can update your system packages. the sudo commands for this purpose are:

How to install GCC on Ubuntu 20.04 GCC ubuntu

How to install GCC on Ubuntu 20.04 GCC ubuntu

Although the upgrade command of sudo is not mandatory, make sure to run the command for updating your system packages. It is a crucial step because, without updating, you can precisely access the level of your system packages.

Installation of Development Package

This is the second step for the installation. Some people just leave the process after this step, and it is quite alright. The steps after this one are just to ensure the installation, so professional programmers usually install the GCC package using the first two steps only. But for beginners, it is recommended to perform all the steps just to be sure that you have successfully installed the compilation of GCC.

Dwell upon the fact that this command of sudo assist in the installation of the development package that itself is a build-essential of GCC compiler. Apply the following command of sudo to install the development package.

$ sudo apt install build-essential

How to install GCC on Ubuntu 20.04 GCC ubuntu

After this command, you will see an output window that will tell you about the successful installation. The output will also reveal all the additional packages that you have downloaded along with your development package. You will also witness the packages suggested by the system for downloading along with the recommendation of a manual page to understand the GCC development on your Ubuntu 20.04 fully. The output window will also ask you to type Y (Yes) for the continuation of the installation. Just press Y and then press Enter, and you will successfully install the GCC.

Downloading of Manual Pages

This step is optional because it doesn’t play any functional role in the overall installation of GCC. But it can assist you in understanding the usance of GNU for effective development. Type the following command if you want to download the manual pages.

$ sudo apt-get install manpages-dev

How to install GCC on Ubuntu 20.04 GCC ubuntu

With this, you will get a hold of the manual pages constituting the instructions for development.

Verification of GCC.

Now, this is the last step. You can skip it if you are a professional or if you are sure that the compiler has been installed. To verify your recently installed GCC compiler on ubuntu input this command in your system terminal:

How to install GCC on Ubuntu 20.04 GCC ubuntu

It is important to know that you can also use this command at the beginning of the process if you have existing GCC on your system. It will tell you the existing version of the GCC compiler then.

Conclusion

This guide is well-detailed so that even if you are a beginner in the field of programming, you can still install GCC will efficiency. If you notice the output window after every command keenly, then you’ll know what is going on, what are the supplements downloads, and what you need to do further for assurance of your installation package. Also, if you are a beginner, then ensure the implementation of the last two steps to be on the safe side.

About the author

How to install GCC on Ubuntu 20.04 GCC ubuntu

Younis Said

I am a freelancing software project developer, a software engineering graduate and a content writer. I love working with Linux and open-source software.