The Terminal in Mac OS X is located inside the utilities folder inside the applications folder. It emulates the command line interface found in UNIX and Linux. It is an indispensable tool that will allow you to install and interface with a plethora of robust open-source applications. Let's look at a few commands:

cd some-folder-or-file-name

cd or "change directory" navigates the terminal to another directory. cd allows you to navigate your computer's folder structure. Use a double period .. to navigate to the parent folder just as we do with our relative paths. Many file names and folders will have spaces. In the terminal a space is an indication of a separate command. To avoid the confusion spaces must be escaped with a forward slash while changing directories as in:

cd some\ folder\ or\ file\ name

A neat trick in OS X is to type cd and then drag and drop the folder you want to navigate to right into the terminal window.


ls lists the contents of the current directory. It can be helpful in checking if you are in the right directory.

mkdir some-folder-name

mkdir creates a folder.

We will eventually be needing servers to run our programs as just opening the files in a browser sometimes isn't enough. To do so, first navigate to the directory where your index.html (or index.php) file is located and type:

php -S localhost:8000

Then go to the browser and type the url localhost:8000. Should the php command not be configured properly on your computer, you can start a python server as an alternative.

python -m SimpleHTTPServer 8000

Both commands allow you to serve webpages locally (i.e. on your computer).