So, I am just starting out to learn Fortran programming. I am a complete newcomer to programming. I have little experience with Ubuntu. What are the recommended ways to install Fortran on Ubuntu?
So, I am just starting out to learn Fortran programming. I am a complete newcomer to programming. I have little experience with Ubuntu. What are the recommended ways to install Fortran on Ubuntu?
For Fortran alone, you can use
But even if it takes more space, it is useful to have
This installs several other capabilities, including
gcc
,g++
andmake
.You may also want to install the manual pages about using GNU/Linux for development:
First, update the deb repositories using
Then type
This will install everything needed for programming in FORTRAN.
This is not a direct answer to your question. However, for small test programs and exercises, you can also use one of the many online Fortran compilers. I specifically like the online gfortran compiler by tutorialspoint.com:
https://www.tutorialspoint.com/compile_fortran_online.php
because they give you the option to set the compiler/linker flags by yourself. I have also directly asked them to set the default Fortran standard to Fortran 2018 (+ GNU Fortran extention) so that the user is automatically able to use all the new features of Fortran 2003/2008/2018.