Setup for Mac OS X
This guide will help you setup a software development environment on Mac OS X 10.9 Mavericks and above. By the end, your computer will be configured with the same state-of-the-art tools used by professional software developers.
This guide is mostly compatible with older versions of Mac OS X. So follow along as best you can while Googling any problems you come across.
Included in Mac OS X is the Terminal: an app that runs a Unix shell.
A Unix shell (often referred to as a "terminal") is a command line user interface between you and your computer's operating system. In a Unix shell, you can type in commands that tell the computer to do many things: navigate to files and folders, install and run programs, and change configurations. Programmers rely on their Unix shells to do lots of work, quickly and easily.
You're probably most familiar with the graphical user interface (the "GUI") of your computer's operating system. Those are the boxes, windows, and menu items that you click on with your mouse. While that's technically a shell too, most programmers think of the textual, command line interface when they hear to word shell.
Explore the Terminal
Let's get our hands dirty and have some fun. First, use Spotlight to launch the Terminal app.
Once launched, you'll see something like this.
Here's a quick break down of what you're seeing in the Terminal app.
||Date of your last login|
||Name of your last terminal session|
||Name of your computer|
||Name of your working directory|
||Name of your user account|
Any characters you type will appear after the
$ prompt symbol. Go ahead and type
uname. After pressing the Enter key, you'll see something like this.
Here's what happened:
- The shell waited for you to type a command.
- You then typed the word
unamewhich appeared after the prompt.
- You pressed the Enter key which triggered the shell to accept your input.
- The shell searched for a program called
- Once found, the shell launched the
unameprogram and handed it control over the Terminal.
- While running, the
unameprogram told the Terminal to display the word
- Once finished, the
unameprogram exited and handed control of the Terminal back to the shell.
- The shell told the Terminal to display another prompt.
- Once displayed, the shell began waiting for your next command.
Simply stated, a Unix shell works in a read-evaluate-print loop or REPL.
Change the Terminal Profile
The default profile for the Terminal uses small, black text on a white background. Boring! Let's change that.
- In the Terminal app, navigate to the
Terminal > Preferencesmenu item.
- In the preferences window, click the
- On the left side, scroll to the bottom, select the
Proprofile, and click the
- Finally, quit and relaunch the Terminal.
Now, every new Terminal window will look similar to this.