Ubuntu is a great OS to program on. If you usually program in Pascal, you can do that in Ubuntu! In Ubuntu, the default Pascal compiler is Free Pascal. Here’s how to install and use Free Pascal in Ubuntu 9.04.

  1. Make sure you have established an internet connection.
  2. Open terminal and type
    sudo apt-get install fpc

    Type your root password if prompted.

  3. Wait until it finishes downloading and installing.

Done! Your Free Pascal has been installed. Now you can compile your .pas file into executable file, like this:

fpc test.pas

and run the resulting executable,

./test

Using the IDE

Actually you can configure many programming editor to work with Pascal compiler. But if you prefer to use the classical style Free Pascal IDE, please do these following additional steps.

  1. Right-click on your application menu, and click Edit Menus.
  2. Select Programming.
  3. Click New Item.
  4. Enter these details:
    • Type: Application
    • Name: Free Pascal
    • Command:
      gnome-terminal --title="Free Pascal" --geometry=80x40 --hide-menubar -e fp
    • Comment: up to you
  5. Click OK.

That’s it! Now you can access Free Pascal IDE in Application->Programming->Free Pascal.

Free Pascal IDE in Ubuntu

Free Pascal IDE on Ubuntu

Happy coding!

  • Share/Bookmark

Enjoyed this article? Subscribe to our RSS feed for free!

Related posts:

One Response to “Installing and Using Free Pascal in Ubuntu”

Elvivon says:
January 8, 2010 at 04:58


Thank you very much it very help me :)

[Reply]

Leave a Reply