From ModMyiFone - Wiki
Part 2 - Running Jailbreak and iPhoneInterface.
THIS GUIDE IS FOR INTEL OS X USERS ONLY. This is Part 2 of a 4 part tutorial. Part 1 is here.
All right, we've got everything prepared, lets now Jailbreak our iPhone. The iPhone initially comes with access to the filesystem disallowed. Jailbreaking the iPhone grants you full system access. You must always rejail the iPhone after using iPhoneInterface, which we will discuss later in this part.
Ok, here we go.
Step 1.
Make sure your iPhone is docked and charged.
Step 2.
Quit iTunes. Don't just minimize it, shut it down. If you have the iTunes Helper open, you must quit that as well. To determine if they are running, open the Activity Monitor program found in the Utilities folder inside of the Applications folder. If it is running, highlight it in the list and click the "Quit Process" button.
Step 3.
Make sure the iPhone is on.
Step 4.
Go to your Applications folder and then go into the Utilities folder and find the program called Terminal. You should move this to your dock for easier access. Note that when typing in the terminal, everything is case sensitive. So watch your capital letters and lower case letters. Do not interchange them, they won't work.
Step 5.
Start Terminal and type:
cd /phonedmg Then press the return key.
You'll see you are now in the phonedmg directory where all of your files that you downloaded
earlier should be.
Step 6.
Type:
./jailbreak then press the return key. You should see the text
Looking for iPhone... If you don't, then you did something wrong. When you run jailbreak with the iPhone on you'll get this:
It will next say:
Step 7.
Press and hold the Home button and the Sleep/Wake button for a full 25 seconds.
The iPhone will restart in recovery mode. At this point the iTunes program may open, so close it.
Note: If you have iTunes 7.3.1 it won't launch automatically when you go into recovery mode. Continue to Step 8.
Note: If you have iTunes 7.3.054 go back to the Terminal window running jailbreak and press and hold the CTRL key while pressing the C key. You have to do this because jailbreak tells you to go into recovery mode, and doesn't give you a prompt to kill the shell process.
At the new prompt type ./jailbreak Then press the enter key. A few additional lines of text will appear as the iPhone is modified. This process may take up to one minute and it won't look like anything is happening, but trust me, jailbreak is busy. What until you get a screen similar to the one below.
Step 8.
Step 9.
Back in the Terminal type:
./iPhoneInterface Then press the return key.
Congratulations! You are now in your iPhone and ready to move to Part 3, Installing SSH. Make sure you complete the next part before disconnecting your iPhone, or you WILL have problems!