How can I access the command line / prompt on my iPhone?

How can I access the command line / prompt on my iPhone?

There are several ways to connect to your iPhone filesystem provided the device is already jailbroken. Basically you can access the command line directly on the iPhone or from a computer using a terminal window.

1. First make sure that OpenSSH is installed on your jailbroken iPhone. If you need to, follow this tutorial to install OpenSSH using Cydia. All of the following options require OpenSSH.

2. To use a computer, follow these instructions on how to SSH into your iPhone from a computer over a Wi-Fi network.

3. You can open a Terminal window directly on your iPhone. For iPhones running iOS 4 and later firmware, follow this guide on how to install the MobileTerminal app in iOS 4 and iOS 5. If you're running earlier firmware (iOS 3.x) you can install the MobileTerminal package directly from Cydia.

4. If you already have a paid SSH client application from the App Store (iSSH, TouchTerm) you can use this app to access the command line on your iPhone. Just create a new connection to the host 127.0.0.1 and connect as username root, password alpine.

5. For security, whenever you have OpenSSH installed make sure to change your root password on the iPhone. This is important, because all iPhones have the same default password!