Switching
8. Switching System GCC
Finally, to easy Managing GCC Versions use update-alternatives
So first install the New GCC 11.2 with:sudo update-alternatives --install /usr/bin/gcc gcc /usr/local/bin/gcc 10
And then the System GCC with for instance:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 20
Eventually amend the above Command with the Path found on Step 2.
Next to Switch between GCC Versions play:sudo update-alternatives --config gcc
Last, to test the GCC in use:
gcc -v
![Step-by-step GCC 11.2 KDE Neon Linux Installation Guide - update-alternatives GCC](https://tutorialforlinux.com/wp-content/media/dg139/terminal/updateAlternatives-configGcc10.png)
Congratulations, your GCC 11.2 should be now nicely working on KDE Neon Linux. Good Luck! :)