GFortran
About this Install Guide
| Reading time: | 15 min |
| Last updated: | 22 Jun 2026 |
| Reading time: |
| 15 min |
| Last updated: |
| 22 Jun 2026 |
This guide shows you how to install and use the tool with the most common configuration. For advanced options and complete reference information, see the official documentation. Some install guides also include optional next steps to help you explore related workflows or integrations.
GNU Fortran is the Fortran compiler front end and run-time libraries for GCC, the GNU Compiler Collection.
How do I prepare to install and use gfortran on an Arm Linux distribution?
Confirm you are using an Arm machine by running:
uname -m
The output should be:
aarch64
If you see a different result, you are not using an Arm computer running 64-bit Linux.
How do I download gfortran using the Linux package manager?
The Linux package manager downloads the required files so there are no special instructions.
How do I install gfortran on Debian-based distributions such as Ubuntu?
Use the apt command to install software packages on any Debian based Linux distribution, including Ubuntu.
sudo apt update
sudo apt install gfortran -y
How do I install gfortran on Red Hat, Fedora, or Amazon Linux?
These Linux distributions use yum as the package manager.
To install the most common development tools use the commands below. If the machine has sudo you can use it.
sudo yum update -y
sudo yum install gcc-gfortran -y
If sudo is not available become root and omit the sudo.
sudo yum update -y
sudo yum install gcc-gfortran -y
Do I need to set up a product license for gfortran?
Arm GNU Toolchain is open source and freely available for use. No licenses need to be set up for use.
How do I verify the gfortran installation and get started?
To confirm the installation is complete run:
gfortran --version
To compile an example program, create a text file named hello.f90 with the contents below.
program hello
! This is a comment line; it is ignored by the compiler
print *, 'Hello, Arm world!'
end program hello
To compile the program use:
gfortran hello.f90 -o hello
To run the application use:
./hello
The program will print the string specified in the print statement.
Give Feedback
How would you rate this tool quick-install guide?
What is the primary reason for your feedback ?
Thank you! We're grateful for your feedback.
- Have more feedback? Log an issue on GitHub.
- Want to collaborate? Join our Discord server.