How Do I Change the Default Gcc in Ubuntu?
Contents How Do I Change the Default Gcc Compiler in Ubuntu? Type Update-Alternatives –Config Gcc to Be Asked to Choose the Gcc Version You Want to Use Among...
Contents
How do I change the default gcc compiler in Ubuntu?
Type update-alternatives –config gcc to be asked to choose the gcc version you want to use among those installed. (Note the use of cpp-bin instead of just cpp . Ubuntu already has a cpp alternative with a master link of /lib/cpp . Renaming that link would remove the /lib/cpp link, which could break scripts.)
Must Read
Does Ubuntu have gcc by default?
The gcc package is installed by default on all Ubuntu desktop flavors.