GNU Compiler Collection (GCC) is a compiler system. It was produced by the GNU project to support various programming languages. It can support the languages such as C(GCC), C++ (g++), Objective-C, objective-C++, Fortran (gfortran), Java(gcj), Ada(GNAT), and GO (gccgo). The compiler version in Linux server can be viewed with the GCC command.

About GCC command Options:

Compiler Version in Unix/Linux system should be found to compile any package from its source codes. GCC commands can normally perform preprocess, assembly, compilation, and linking. The “overall options” allows you to stop this processes at an intermediate stage. The GCC program accepts options and file names as operands.

How to install GNU compiler collection:

  • If you are using Red Hat Enterprise Linux version 4.0 or older, then enter the command # up2date GCC
  • If you are using CentOS/Fedora Linux or RHEL version 5.0 or above, then enter the command # yum install GCC
  • If you are using Debian/Ubuntu Linux, then enter the command $ sudo apt-get install GCC or # apt-get install GCC

Command to view the server compiler version: 

The command gcc-vis used to view the server compiler version.

The command gcc --version can be used to check the version number of GCC.