Currently the gfortran compiler in my ubuntu system is
GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Wishing to update it I did what Installing GFortran - Fortran Programming Language
says:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gfortran-10
but on doing that I find
john@johns-laptop:~$ gfortran --version
GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0