From ModMyiFone - Wiki
This guide is to install the BSD Subsystem by Nervegass on a jailbroken 1.1.1 iPhone. This is to be followed after you have gotten SSH running.
Download the following files:
http://iphone.natetrue.com/BSD_Base-2.0.tar.gz
http://iphone.natetrue.com/BSD_Extra-2.0.tar.gz

Extract them both to your Desktop.

Fire up terminal. Type in
cd
Now Drag the BSD_Base folder to your terminal window

hit enter

Type in
scp -r * root@yourphonesip:/

Hit enter. The screen will ask you for the password. Type in
alpine
followed by enter. The files will transfer over.



Type in
cd
and drag the BSD_Extra folder to your terminal window

hit enter

Type in
scp -r * root@yourphonesip:/

Hit enter. The screen will ask you for the password. Type in
alpine
followed by enter. The files will transfer over.

If you are activating without a AT&T sim go here
If you are activating with AT&T click here