Mobile Terminal & Commands


Mobile Terminal or Mobile Terminal.app is a terminal emulator for iPhone that power users use it to interact with the iPhone through a command line interface (like cmd in Windows or Terminal in OSX) and of course you have to be jailbroken first as it's available through Cydia only.
It's not an SSH client nor Telnet for this matter, it can however be used to execute a console ssh-client application.
In order to use it, you have to be logged in as Super User or simply to have root access to the device (Administrator).
Here we will discuss some of the commands that are frequently used.

Note that most & best currently working version on Cydia is 520-1. 






To log in as root (administrator):
Open Terminal and type:
su root
alpine (password line),  it's the default password, characters will not show while you type so don't panic.
YOU MUST CHANGE IT LATER FOR SECURITY, below you will see how.

Now some basic commands:
- Ignore the (*) signs when typing the command, it's for marking only.
 Type the following:-
 
 *help*
 To present a list of terminal commands that you can use.


 *dir*
 To list directory files.

 *cd* or *cd ~*
 To go to the home directory.

 *cd /directory name*
 To go to specified directory.


 *respring*
 To respring device ( springboard ).

 *reboot*
 To reboot device.

 *apt-get update*
 To update cydia pacakges (as when you use refresh in cydia).

 *apt-get upgrade cydia*
 To install any upgrades needed for your packages.

 *apt-get install cydia*
 To install the latest update for cydia (if latest version not installed).


 *apt-get autoclean*
 To clean up files if needed.

 *apt-get autoremove*
 To check unused or borken files & uninstalls them after your confirmation on the list that will be provided.

 *apt-get -fix-missing*
 To check for missing files & fix it.

 *dpkg -list>packages.txt*
 To create a list of installed cydia pacakges.

 *dpkg -i packageID*
 To install .deb files, ( PacakgeID is the name of the .deb file).

 *dpkg -r pacakgeID*
 To uninstall the .deb file or the cydia pacakge installed.

 *apt-get install packageID*
 To install cydia packages.

 *apt-get remove packageID*
 To uninstall cydia packages.

 *dpkg -P*
 To purge configuration files for uninstalled packages.(if a package is still causing issues even after         uninstalled ).


To Change The Root Password:-
Open Terminal and type:
*su*
*alpine*
*cd*
*passwd*
Enter your new root password and press return key.
Then re-type your new root password again and press return key.
Then repsring and it's done.

Make sure you memorize it or keep it on a safe place as if forgotten or got in the wrong hands, it will be a silly :)

So enjoy this nice commands as it might come handy one day.



Sources:
http://code.google.com/p/mobileterminal/wiki/TipsAndTricks
http://en.wikipedia.org/wiki/Main_Page
http://ipad-os.net/
http://jailbreaka.com/




Comments

M.Farag said…
Thanks :)
It really helped with my new 4S.

Popular Posts