To follow these steps you will need to have already jailbroken your iPhone or iPod touch.
Press to launch Cydia from your iPhone's Springboard.
Once Cydia opens press to select the Sections tab at the bottom of the screen.
Press to select Terminal Support from the list of Sections.
Press to select MobileTerminal from the list of Packages available.
Press the Install button at the top right of the screen.
Press the Confirm button to begin installation.
Once the installation has completed successfully press the large Return to Cydia or Close Window button.
Press the Home button to return to your Springboard. Notice the new MobileTerminal icon. Press to launch it!