Where is my Linux GNU C or gcc compiler installed?
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
E-mail this to a friend
Printable version
Related Other Helpful FAQs:
- Download or install C, C++ compiler on Red Hat Enterprise Linux 5 (RHEL)
- Linux command - finding and running commands
- How do I find all the files owned by a particular user or group?
- Locate files on linux, FreeBSD and UNIX system
- Finding files in Linux filesystems
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!



Recent Comments
Yesterday ~ 12 Comments
Yesterday ~ 7 Comments
Yesterday ~ 2 Comments
Yesterday ~ 3 Comments
Yesterday ~ 3 Comments