I'm new to Ubuntu and don't know anything about using the command line.

  • 1
    Please edit your question and describe what you're trying to do.
    – Carl H
    Feb 16 '17 at 22:51

If you have the code below in the text file hello.f90

Program Hello
Print *, "Hello World!"
End Program Hello

To compile the code, start the terminal and type:

gfortran -o hello hello.f90

To run the code, type


You need to have the compiler installed. If it is not installed type the following in the terminal:

sudo apt-get install gfortran

The hello.f90 file should be created in your home folder, e.g. using

gedit hello.f90&

Not the answer you're looking for? Browse other questions tagged or ask your own question.