This question already has an answer here:

In the new Ubuntu 18.04:

  • What's the default GCC version (with which the binaries were built)?
  • What GCC versions are available as separate packages (and what minor version is installed if I install GCC 4, 5, 6, 7 or 8 respectively)?
  • What Clang versions are available as separate packages (and what minor version is installed if I install clang 4 or 5?)

I can't find this in any release notes (and I don't want to have to install just to check.)

marked as duplicate by muru, karel, Kevin Bowen, Eric Carvalho, K7AAY Jun 11 '18 at 23:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Thanks to the commenters, I checked Ubuntu's package server:

  • Default compiler: GCC 7.3.0 (not 4.7 - read the version string carefully)
  • Can install: GCC 4.8.5, GCC 5.5.0
  • Can install from the "universe" repositories: GCC 6.4.0, GCC 8 (version string 20180414, not quite sure what that means)
  • Can install: clang 6.0 (default version), clang 3.9.1, clang 4.0.1, clang 5.0.1

If you add the toolchain-r PPA, you can also install GCC 8.1.0.

  • 1
    The gcc-8 package (and plenty of related packages) are in the universe repository, but in 18.04 it is I think a pre-release version. – dobey Jun 9 '18 at 12:20
  • 1
    Also, gcc-6 is installable as well, as version 6.4.0. – dobey Jun 9 '18 at 12:21
  • »version string 20180414« means : Year 2018 Month 04 Day 14. ... Note: You can have as many compiler versions as you want, installed at the same time. – Knud Larsen Jun 9 '18 at 14:25
  • @KnudLarsen: Of course that's a date, but what does that date mean? Is it related to a release? To a certain branch? Surely it's not the GCC trunk... – einpoklum Jun 13 '18 at 18:53
  • gcc-8 (8-20180414-1ubuntu2) is a git / svn version dated eighteen days before the official release gcc.gnu.org/gcc-8 ... Debian added 133 patches archive.ubuntu.com/ubuntu/pool/main/g/gcc-8/… – Knud Larsen Jun 13 '18 at 20:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.