Q. Where is my GNU C compiler? Where does the GNU C (gcc) compiler reside in the CentOS Linux installation? How do I install if it is not installed by default?
A. Use which command to locate c compiler binary called gcc. Usually it is installed in /usr/bin directory.
Type following command to see Linux C Compiler location:
$ which gccOutput:
/usr/bin/gcc
Display gcc version:
$ gcc -vOutput:
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux Thread model: posix gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)
Use up2date or yum or apt-get command to install gcc and required libs:
If you are using Red Hat Enterprise Linux, type the command:
# up2date gcc
If you are using CentOS/Fedora Core Linux, type the command:
# yum install gcc
If you are using Debian /Ubuntu Linux , type the command:
$ sudo apt-get install gccOR# apt-get install gcc
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- My 10 UNIX Command Line Mistakes
- Linux: 20 Iptables Examples For New SysAdmins

- 25 PHP Security Best Practices For Sys Admins
- The Novice Guide To Buying A Linux Laptop
- 10 Greatest Open Source Software Of 2009
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
Facebook it - Tweet it - Print it -


{ 8 comments… read them below or add one }
Hi this help is awesome it helps me a lot , i was looking for this commands in pages of my country(peru) but i didn’t find anything . thanks a lot .
You just saved my life! Thank you so much for the info…
Thank you!
Excellent work… Your help is really appreciate………….
it helped me a lot
Thanks….save me tons of time,, :)
thank u very much for the help
This tutorial helped me much. Thanks
1000 Thank Yous.