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
Install latest Gfortran compiler on MacOS
brew install gcc