Linux Find Out What Compilers Are Installed or Available On The System

You can use the following commands to find out what compilers are installed or available on a Linux system:

  1. gcc -v: This will display information about the version of the GCC (GNU Compiler Collection) compiler that is installed, if any.

  2. whereis cc: This will show the location of the cc compiler, which is usually a symlink to the default system compiler, such as GCC.

  3. which cc: This will show the full path of the cc compiler if it is in the PATH environment variable.

  4. ls /usr/bin/ | grep cc or ls /usr/bin/ | grep gcc: This will list all files in the /usr/bin/ directory and search for the cc or gcc compiler.

  5. dpkg --list | grep compiler: If you are using a Debian-based system, you can use this command to list all the packages that contain the word “compiler” in their name.

These commands will give you a good idea of what compilers are available on the system. If a compiler is not installed, you can install it using the package manager for your Linux distribution, such as apt-get for Debian-based systems or yum for Red Hat-based systems.

Leave a Comment