GCC, GNU Compiler Collection is a compiler system supporting various programming languages like C, C++, Objective-C, Fortran, Java, Ada and Go. GNU Compiler Collection is released under the GNU GPL license by the Free Software Foundation. Developed as the official compiler for GNU Operatin System, GCC has been adopted by most of the operating environments like Linux and BSD. Versions are also available for Windows and other operating systems.
If you have installed any Linux distribution on your system, chances are you already have GCC. In case, you do not have pre-installed gcc you can follow these steps.
Installing GNU Compiler Collection in Debian [Command Line]
Open Terminal and type the following command:
$ sudo apt-get update
$ sudo apt-get install build-essential manpages-dev
Find the version and the installation directory
$ whereis gcc
To check the directory in which gcc is present.
$ gcc --version
To check the version installed.
Graphical way to install [Debian User]
You can install gcc through the Add/Remove Software box. Navigate to System Tools > Add/Remove Software.
Search for gcc. Select the packages which you want to install (recommended for advance users who have all the knowledge about packages), else just select all the packages and install them.
Installing gcc in other Linux Distribution
If you are using Fedora, RedHat or CentOS, you can use the yum command to install gcc.
# yum groupinstall 'Development Tools'
If are using Linux Mint, run these commands in the terminal.
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.7 c++-4.7
Are you using any other Linux Distribution? Help our readers to install gcc on their Linux system by giving the terminal commands in the comments.
Note: It is most likely that your system already has gcc installed. Do check it first before manual installation.