NOTE: As a heads up, I will not be adding to this gist anymore. I've written more detailed instructions for each language on the COMP-348 website, and you can find a lot more help on that website than what's available here.
For Prolog, I highly recommend just using an online editor.
This editor allows you to do everything you would do by downloading a local Prolog environment, while giving you a likely more comfortable user interface than the terminal. It's very easy to use, when you open it up, you'll see a page that looks like this:
Simply click on the Program
button, and you'll be brought to a small text editor. On the left hand side is where you put all your facts and rules. For example, copy-paste this into the left-hand side: