• Home »
  • »
  • How to Install MacPorts on Snow Leopard 10.6

How to Install MacPorts on Snow Leopard 10.6

I have recently gotten a macbook pro to play around with so my next few articles will most likely cover getting the tools and such the way I want them on the mac book pro. The first thing I discovered is that many of the command line tools which I use every day such as nmap are available in the macports package which is a package management system similar to what I was used to in Linux.

I will details the steps I had to take to get macports installed:

1. The first thing I had to do was install Xcode. This includes the C compiler and many other development tools needed to build many of the packages which can be downloaded with macports. Xcode comes on your Snow Leopard install disc so you will need that.

2. Insert the CD into the drive and when the install window shows up you should se a folder that says Xcode. Open the folder and install the .dmg file inside by double clicking on it.

3. Click the button Customize, expand the Applications category and click the check box beside X11 SDK to add it to the default items.

4. Ensure that the option for command line development, which is labeled Unix Development in the Xcode installer, is checked.

5. Install the Xcode package

6. Once Xcode is finished we can install macports

7. I used the prebuilt image of macports for Snow Leopord here

8. Once Downloaded open the image file and install it just like any other package.

9. Once the install is complete you can now open a terminal from applications > utilities > terminal and install a variety of tools.

A basic port search command would be:


  1. Infidel:~ purehate$ sudo port search nmap
  2. Password:
  3. nmap @5.21 (net)
  4.     Port scanning utility for large networks
  6. p5-nmap-scanner @1.0 (perl)
  7.     Perform and manipulate nmap scans using perl
  9. Found 2 ports.

And then to install it:


  1. Infidel:~ purehate$ sudo port install nmap
  2. --->  Computing dependencies for nmap
  3. --->  Cleaning nmap

I actually already installed it but if I hadn’t it would have installed nmap and all it dependancies.

Mac OS X Snow Leopard: The Missing Manual (Missing Manuals) (Paperback)

List Price: $34.99 USD
New From: $1.91 USD In Stock
Used from: $0.01 USD In Stock

Mac OS X for Unix Geeks (Leopard) (Paperback)

List Price: $34.99 USD
New From: $16.92 USD In Stock
Used from: $0.01 USD In Stock