Installing Gfortran 7.2 on Ubuntu

The latest Gfortran version is useful to have, particularly for those wanting Gfortran Fortran 2015 features, where Gfortran ≥ 7.2 is very good to have.

Install latest Gfortran compiler on Linux / Windows Subsystem for Linux

add-apt-repository ppa:ubuntu-toolchain-r/test
apt update
apt install gfortran-7

If you want older versions of gfortran

apt install gfortran-6

  Then you can select which compiler version among multiple versions installed

Install latest Gfortran compiler on MacOS

brew install gcc

Install latest Gfortran compiler on Windows

Install Windows Gfortran, GCC, Cmake, etc.

Leave a Comment