apt install
command. Furthermore, by use of the update-alternatives
tool you will learn how to easily switch between multiple GCC and G++ compiler versions and how to check the currently selected compiler version.
This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-switch-between-multiple-gcc-and-g-compiler-versions-on-ubuntu-20-04-lts-focal-fossa