Skip to content

Instantly share code, notes, and snippets.

@zchrissirhcz
Last active March 21, 2025 14:42
Show Gist options
  • Save zchrissirhcz/ee13f604996bbbe312ba1d105954d2ed to your computer and use it in GitHub Desktop.
Save zchrissirhcz/ee13f604996bbbe312ba1d105954d2ed to your computer and use it in GitHub Desktop.
Ubuntu Distro GCC GLIBC GLIBCXX C++-Standard versions

Linux Distro GCC GLIBC C++-Standard versions

GLIBC versions: https://launchpad.net/ubuntu/+source/glibc https://code.launchpad.net/ubuntu/+source/glibc

OS Version

cat /etc/os-releases

GLIBC Version

Pick one of the following:

ldd --version | head -n1
/lib/x86_64-linux-gnu/libc.so.6 | head -n1
/lib64/libc.so.6 | head -n1

GLIBCXX Version

Get path of libstdc++.so:

gcc -print-file-name=libstdc++.so

Get all supported GLIBCXX versions

strings /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.so | grep -E 'GLIBCXX_[0-9]+\.[0-9]+\.[0-9]+'

Get the latest of supported GLIBCXX version

strings /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.so | grep -oP 'GLIBCXX_\d+\.\d+\.\d+' | sort -V | tail -n1

So finally we get:

strings `gcc -print-file-name=libstdc++.so` | grep -oP 'GLIBCXX_\d+\.\d+\.\d+' | sort -V | tail -n1

Supported C++ Standards

Get supported C++ standards by current installed GCC by one-line command:

gcc -v --help 2> /dev/null | grep -iv deprecated | grep "C++" | sed -n '/^ *-std=\([^<][^ ]\+\).*/ {s//\1/p}'

https://stackoverflow.com/questions/34836775/compiler-standards-support-c11-c14-c17

Table

NickName GCC GLIBC GLIBCXX Supported C++ Standards ReleaseNotes
ubuntu 16.04.7 Xenial Xerus 5.4.0 2.23 3.4.21 c++{03,11,14,1z,98} link
ubuntu 16.10 Yakkety Yak >=5.3.1 2.24 link
ubuntu 17.04 Zesty Zapus 2.24 link
ubuntu 17.10 Artful Aardvark 2.26 link
ubuntu 18.04.6 Bionic Beaver 7.5.0 2.27 3.4.25 c++{03,11,14,1z,98}
ubuntu 20.04.6 Focal Fossa 9.4.0 2.31 3.4.28 c++{03,11,14,17,2a,98}
ubuntu 22.04.1 Jammy Jellyfish 11.2.0 2.35 c++{03,11,14,17,20,23,2a,2b,98}
ubuntu 22.04.2 Jammy Jellyfish 11.4.0 2.35 3.4.30 c++{03,11,14,17,20,23,2a,2b,98}
ubuntu 23.10 Mantic Minotaur 13.2.0 2.38
ubuntu 24.04.1 Noble Numbat 13.2.0 2.39
ubuntu 24.04.2 Noble Numbat 13.3.0 2.39 3.4.33 c++{03,11,14,17,20,23,2a,2b,98}
ubuntu 24.10 Oracular Oriole 13.2.0 2.39 c++{03,11,14,17,20,23,2a,2b,98}
openEuler 22.03-lts 10.3.1 2.34 3.4.28 c++{03,11,14,17,20,2a,98}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment