The GNU C Compiler (GCC) is typically installed in the /usr/bin
directory on a Linux system. You can use the whereis
command to locate the installed GCC executables.
For example, to locate the gcc
executable, you can use the following command:
whereis gcc
This will display the path to the gcc
executable, as well as the paths to any related man pages and source code.
If the gcc
executable is not found, it may not be installed on your system, or it may be installed in a different location. You can use the apt-get
or yum
command to install GCC on a Debian-based or Red Hat-based system, respectively.
For example, to install GCC on a Debian-based system, you can use the following command:
apt-get install gcc
On a Red Hat-based system, you can use the following command to install GCC:
yum install gcc
Once GCC is installed, you can use the whereis
command to locate the installed executables as described above.