Macintosh OSX is based on BSD (Berkely Standard Distribution) which is a Unix like operating system. Apple has modified it much in OSX, but there are many true unix tools left out of the final OS. If you are a more Unixy user, you might want to install a few extra software components to get these tools !
Apples OS comes without UNIX basic tools like lsof which is not useful to a Unix Sysadmin or similar, I did some research and was relieved to find the Mac Ports Project !
It is a collection of packages including Unix apps, Aqua and X11 specific Applications all tuned for install and management on a Macintosh platform.
*note* - since I upgrade to Snow Leopard, my 10.5.x Mac Ports install was broken, read about the Mac Ports upgrade Snow Leopard solutions here*
The syntax of the ports tool is very similar to Red Hat's Yum, Debian's Apt-get or indeed the BSD ports tree.
Pre requesits
- X-code - Found on the install DVD or downloadable from Apple Developer Connection
- X11 Windows Enviroment - Also referred to as X11-User and is available as an option install found on the install DVD. It is also available via Mac Ports after install
- Mac Ports - A BSD ports like package manager system customised for the Macintosh operating system. Website for Mac Ports is here, Downloads here
Updated Versions
Though it can be quite large it is a good idea to download the latest version for your current system in the case it is an upgrade from the original CD. Considering taking the most upto date packages from the internet which are updated regulary over the base file that came with your installation disks.
Follow the install guide
The Mac Ports website contains a detailed installed guide, it works well and there is no need to duplicate or add to it. Follow the guide closely and you will have a working ports system in no time.
Using the ports system
Example usages of the ports system is shown below, in particular how to search for, add and remove a package.
For more extensive details of the port packagement tool enter the command man port and read about it.
Searching for a port package
bigmac:~ neil$ sudo port search xwd
xwd @1.0.2 (x11, graphics)
Dump an image of an X11 window
Installing a package via port
bigmac:~ neil$ sudo port install xwd
---> Fetching xwd
---> Attempting to fetch xwd-1.0.2.tar.bz2 from http://arn.se.distfiles.macports.org/xwd
---> Verifying checksum(s) for xwd
---> Extracting xwd
---> Configuring xwd
---> Building xwd
---> Staging xwd into destroot
---> Installing xwd @1.0.2_1
---> Activating xwd @1.0.2_1
---> Cleaning xwd
Removing or uninstalling a package via port
bigmac:~ neil$ sudo port uninstall xwd
---> Deactivating xwd @1.0.2_1
---> Uninstalling xwd @1.0.2_1





