The Fortran-lang site discusses how to install gfortran on Linux. A user may want additional tools. Below is a list of projects, from my Fortran tools list, that provide a development environment for Fortran programmers for Linux and in some cases macOS and Windows also. I mostly use Windows and have not tried them. If there is a consensus that one or more of these projects is a good way to set up a development environment, they could be mentioned on Fortran-lang.
allgebra: docker images for developing C++ and Fortran HPC programs, by termoshtt and t-hishinuma
fortran-dev-image: image contains recent versions of compilers, MPI and HDF5 libraries along with basic build tools (CMake, Ninja), by HĂĄkon Strandenes. These images can then be used to compile Fortran applications that depend on MPI and HDF5.
fortran-setup: script to set up a system to use Fortran on an Ubuntu-based system, by Federico E. Benelli. It installs a Python package manager for some Python-based tools, gfortran, optionally Intel oneAPI HPC, BLAS and LAPACK, gdb, fuzzy-finder (fzf), Fortran Package Manager (fpm), findent, flinter, FORD, fortls, and fortran_project, a script to generate and open projects.
modern-fortran-docker: Dockerfile to build a modern-fortran Docker image. It is based on Ubuntu 23.10, which has several enhancements to the Linux kernel and supports GCC GFortran v13.2.0. This Dockerfile installs gfortran, OpenMPI, and OpenCoarrays and also git clones the modern-fortran projects.
setup-fortran: GitHub action to set up Fortran compiler and toolchain on Ubuntu, macOS and Windows, from fortran-lang. Available compilers are gfortran, ifx, ifort, lfortran, and nvfortran.