How do I find out what compilers are installed under Debian / Ubuntu / Red hat Enterprise / CentOS Linux operating systems? How do I list all available compiler packages under Linux?
GCC is an Acronym for "GNU Compiler Collection". It is a collection of compilers for C, C++, Fortran and other tools.
You can query your package database for installed compiler set under Linux operating systems.
Command for Debian / Ubuntu Linux users
Type the following command to see installed compilers and version:
$ dpkg --list | grep compiler
Sample outputs:
ii g++ 4:4.4.5-1 The GNU C++ compiler ii g++-4.4 4.4.5-8 The GNU C++ compiler ii gcc 4:4.4.5-1 The GNU C compiler ii gcc-4.3 4.3.5-4 The GNU C compiler ii gcc-4.4 4.4.5-8 The GNU C compiler
To list all available compilers that can be installed, enter:
$ apt-cache search Compiler
$ apt-cache search Compiler | grep -i --color java
$ apt-cache search Compiler | grep -i --color fortran
Sample outputs:
libsidl-1.4.0 - Scientific Interface Definition Language (SIDL) C(++)/FORTRAN runtime libsidl-dev - Scientific Interface Definition Language (SIDL) C(++)/FORTRAN runtime devel libetsf-io-dev - Static libraries and Fortran module files of ETSF_IO f2c - A FORTRAN 77 to C/C++ translator ftnchek - A semantic checker for Fortran 77 programs fweb - A literate-programming tool for C/C++/Fortran/Ratfor gfortran-4.3-multilib - The GNU Fortran 95 compiler (multilib files) gfortran-4.3 - The GNU Fortran 95 compiler gfortran-4.4-multilib - The GNU Fortran 95 compiler (multilib files) gfortran-4.4 - The GNU Fortran 95 compiler gfortran-multilib - The GNU Fortran 95 compiler (multilib files) gfortran - The GNU Fortran 95 compiler gfortran-doc - documentation for the GNU Fortran Compiler (gfortran) gfortran-4.1-doc - documentation for the GNU Fortran Compiler (gfortran) gfortran-4.2-doc - documentation for the GNU Fortran Compiler (gfortran) gfortran-4.3-doc - documentation for the GNU Fortran Compiler (gfortran) gfortran-4.4-doc - documentation for the GNU Fortran Compiler (gfortran)
Use the apt-get command to install compiler under Debian / Ubuntu Linux:
$ sudo apt-get install gfortran
Command for Red Hat / RHEL / CentOS / Fedora Linux users
Type the following command to list all installed compiler:
$ yum list installed | grep -i --color compiler
$ yum list installed | grep -i --color gcc
$ yum list installed | grep -i --color java
$ yum list installed gcc
$ yum list installed 'gcc*'
Sample outputs:
Loaded plugins: auto-update-debuginfo, product-id, protectbase, rhnplugin, subscription-manager Updating certificate-based repositories. 0 packages excluded due to repository protections Installed Packages gcc.x86_64 4.4.6-4.el6 @rhel-x86_64-server-6
To search all available compiler, run:
$ yum search all compiler
However, I recommend the following command to list all development tools under RHEL and friends:
$ yum groupinfo "Development tools"
Sample outputs:
Loaded plugins: auto-update-debuginfo, product-id, protectbase, rhnplugin, subscription-manager Updating certificate-based repositories. Setting up Group Process Group: Development tools Description: A basic development environment. Mandatory Packages: autoconf automake binutils bison flex gcc gcc-c++ gettext libtool make patch pkgconfig redhat-rpm-config rpm-build Default Packages: byacc cscope ctags cvs diffstat doxygen elfutils gcc-gfortran git indent intltool patchutils rcs subversion swig systemtap Optional Packages: ElectricFence ant babel bzr ccache chrpath clips clips-devel clips-doc clips-emacs clips-xclips clipsmm-devel clipsmm-doc cmake cmucl colordiff compat-gcc-34 compat-gcc-34-c++ compat-gcc-34-g77 cvsps darcs dejagnu email2trac expect ftnchek gcc-gnat gcc-java gcc-objc gcc-objc++ ghc git haskell-platform imake jpackage-utils kdewebdev libstdc++-docs lua mercurial mock mod_dav_svn nasm nqc nqc-doc ocaml perltidy python-docs qgit rpmdevtools rpmlint sbcl systemtap-sdt-devel systemtap-server trac trac-git-plugin trac-mercurial-plugin trac-webadmin translate-toolkit
Use the yum command to install compiler under RHEL / CentOS:
# yum install gcc
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop











{ 0 comments… add one now }