My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
TipsAndTricks  
Tips and Tricks for working with Mobile Terminal.
Featured
Updated Jun 13, 2010 by allen.po...@gmail.com

OBSOLETE: This page is out of date and needs to be updated. It does not reflect v426.

Introduction

This page is a collection of tips and tricks that people have found useful. Please feel free to leave your own in the comments, but put feature requests in the Issues section.

Tips

Hide the Keyboard

Tap twice quickly on the screen to hide the keyboard. Repeat to bring it back.

Control Characters

You can send a control-C by pressing the "bullet" key (First press ".?123", then "#+=", then the circle on the middle right), then press the C key. This can be useful when you want to escape out of a long running program such as ping. Control-C can also be accessed with a short Up-Right and Control is a short Down-Right swipe, after which the cursor will turn highlight red, from here press any character q, x, c, A to complete or the delete button to exit Control mode.

Escape is control-[ or a short Up-Left swip, which may come in handy with vi. Tab is control-I or a short Down-Left swip (yay tab completion).

Swipe Controls

Swipe Type Direction Action
Short Up-Right Control-C
Short Down-Right Control-
Short Up-Left Esc
Short Down-Left Tab
Short up/down/left/right arrow keys (respectively)
Long Up None (functions as up-arrow)
Long Down Enter
Long Left None
Long Right None
Two Finger Up Config
Two Finger Down Hide Keyboard
Two Finger Left Page-Up/Next
Two Finger Right Page-Down/PREV

None of the Two Finger Swipes seem to work right in 2.0 firmware

Multiple Terminals

Terminal comes with four terminal windows. Tap on the battery icon to go right, tap directally on the time to go left, and tap on the carrier name (AT&T or iPod) to crash Terminal (or do a really quick killall Terminal depending on how you look at it).

Things to do with your terminal

While this is in no way a full how-to for UNIX systems, these are some of the commands that you may find useful for your Terminal.

Copy

Usage:

1. cp file /
2. cp -r folder /
3. cp folder /
4. cp -r /folder .
5. cp /file ..
  1. Copies file from the current directory to / the root directory
Command cp
Common Flags -r
  • Copies the folder "folder" and its subdirectories and files to the root
  • Copies the folder "folder" to the root, without its subdirectories
  • copies /folder to current directory ( . stands for current directory )
  • copies /file to the directory above the current ( .. stands for the directory above this )
  • Delete

    Usage:

    1. rm file
    2. rm -fr folder
    3. rm -r non-empty-folder
    4. rm -r empty-folder
    1. removes file completely (there is no trash, files deleted with rm are GONE)
    Command rm
    Common Flags -f -r
  • removes folder and its contents recursivly
  • this will fail, if a folder has contents you must use -f
  • this is fine, it will remove empty-folder
  • Free Space

    Usage:

    1. df
    2. df -h
    1. This will output ...
    Command df
    Common Flags -h
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /dev/disk0s1           2048000    465184   1562336  23% /
    devfs                       18        18         0 100% /dev
    /dev/disk0s2          13811364   9972572   3838792  73% /private/var
  • This will output ... (-h is for Human-Readable)
  • Filesystem            Size  Used Avail Use% Mounted on
    /dev/disk0s1          2.0G  455M  1.5G  23% /
    devfs                  18K   18K     0 100% /dev
    /dev/disk0s2           14G  9.6G  3.7G  73% /private/var

    Make Folder

    Usage:

    1. mkdir my-dir
    2. mkdir my dir
    3. mkdir my\ dir - or - mkdir "my dir"
    4. mkdir /mydir
    5. mkdir ~/myowndir
    1. makes the directory my-dir
    Command mkdir
    Common Flags none
  • makes the directories my and dir
  • makes the directory "my dir" with a space
  • makes the directory mydir below the root
  • makes the directory myowndir inside your home folder
  • (root home folder is /private/var/root, mobile is /private/var/mobile)

    Move About

    Usage:

    1. cd
    2. cd ~
    3. cd /
    4. cd ..
    5. cd adir
    6. cd /mydir
    1. goes to your home directory
    Command cd
    Common Flags none
  • same as cd
  • goes to the root
  • goes up one directory
  • goes to adir (if it exists)
  • goes to /mydir
  • Direct Output

    Usage:

    1. ping yahoo.com >output.txt
    2. df -h >freespace
    3. echo "hello world" >hello_world.txt
    4. ls -R / >/dev/null
    1. puts the output of the ping command into a txt file
    Command * >*.*
  • put the output of "df -h" into freespace
  • puts "hello world" into hello_world.txt
  • runs the command "ls -R /" (careful thats a lot of output) but doesn't do anything with the output
  • Background Processes

    Usage:

    1. killall SpringBoard &
    2. killall SpringBoard >/dev/null &
    1. runs the command in the background
    Command * &
  • runs the command in the background and hides the output
  • Common unix binaries

    Get the latest iphone-binkit from http://iphone.natetrue.com which contains lots of useful unix binaries. Also there ssh, apache, python, ruby. Join #iphone-shell on irc.osx86.hu for more discussion.

    For some tips on setting up and using sshd and an ssh client see:

    http://www.thebends.org/~allen/code/iphone-apps/binary/openssh-4.6p1/README

    Binary packages: http://www.thebends.org/~allen/code/iphone-apps/binary/openssh-4.6p1-iphone-binary.tar.gz

    Comment by neomu...@gmail.com, Aug 4, 2007

    backspace?

    Comment by flor...@gmail.com, Aug 4, 2007

    Incredible, this means Ruby on the iPhone. Woah.

    If I had one I'd immediately work on making UIKit available from Ruby.

    Comment by fr3nc...@gmail.com, Aug 6, 2007

    any way to ssh from your iphone to another computer?

    Comment by dave.opa...@gmail.com, Aug 6, 2007
    Comment by joe%inet...@gtempaccount.com, Aug 8, 2007

    how do you get an <escape> char for the VI editor?

    Comment by joe%inet...@gtempaccount.com, Aug 8, 2007

    what terminal is it emulating? What do I set TERM to for editing? Can you select-cut-paste text?

    Comment by joe%inet...@gtempaccount.com, Aug 8, 2007

    If this all works, its the killer app for the IPhone (at least for me!) Thanks!!

    Comment by timobj@gmail.com, Aug 13, 2007

    What about the Tab key? It is too time consuming to type the whole thing if a file has a long name.

    Comment by mattl...@gmail.com, Aug 14, 2007

    Great job, wonderful app, just a few questions.

    I may be silly, but I just can't figure out how to use VI without the arrow keys. Is there a way to use arrow keys?

    What terminall is it using. VI seems to default to ANSI. Can I use Xterm?

    Comment by davel...@gmail.com, Aug 14, 2007

    The current version included with Installer.app blows up when starting. It starts loading, and then just disappears. Any suggestions?

    Comment by mwen...@gmail.com, Aug 16, 2007

    To navigate in vi: h=left j=down k=up l=right

    Comment by ryan.fin...@gmail.com, Aug 17, 2007

    davelugo: Try installing the latest iphone-binutils. It seems that you need /bin/login installed (and you'll actually get a bash shell instead of just sh)

    Comment by simonrsp...@gmail.com, Aug 17, 2007

    Anyone know how to hide the keyboard in the vt100 branch ? I tried various gestures and figured out up, down, left, right etc, but can't for the life of me figure out keyboard hiding (it's not a single touch like the trunk)

    Comment by tgwa...@gmail.com, Aug 17, 2007

    Is this what we should be using? Terminal-unstable-vt100-branch-152.zip ??

    o colors are VERY broke

    o double tap says 'display all possibilities?' (doesnt affect the keyboard)

    o green is a lot harder to read than white (maybe some options for these things?)

    o screen doesnt work because the app does not hold control + a down at the same time. (a c-a key on the number pad would RULE for this app, so you press 1 key that does control-a then a number).

    Comment by tgwa...@gmail.com, Aug 19, 2007

    so 141 is a lot better, still no ability to use screen, some font settings and such would be neat :)

    Comment by david.kw...@gmail.com, Aug 19, 2007

    is the 5 second delay during startup normal?

    Comment by joshmh...@gmail.com, Aug 20, 2007

    I am seeing something strange since upgrading today. Now when I open Terminal I can only type 3 characters then a newline is forced and it tries to run what ever 3 letters I had.

    Anyone else see this?? I also reverted back to v85 and the same thing happened so sounds like I maybe broke something? Any ideas?

    Comment by tgwa...@gmail.com, Aug 22, 2007

    PLEASE add that pie graph thingy to the iterm branch!! the vt100 just doesnt handle the colors right. :((

    Comment by tgwa...@gmail.com, Aug 22, 2007

    Also PLEASE add a control-A to that graph.. maybe instead of the arrow keys. this is a MUST have for screen. I will gladly donate. :)

    Comment by izzymetr...@gmail.com, Aug 22, 2007

    Seems to be a fundamental problem with pico and MobileTerminal?. I've set my term environment to vt100 and copied over required files, but all I get are control characters. Any ideas what the problems might be?

    Comment by garrett....@gmail.com, Sep 8, 2007

    I want to be able to ssh into my other computers on my network and remotely. My computers use public keys that were generated with "ssh-keygen -t dsa". Normally you would put your private key into your home directory under .ssh. Where do I go about putting my private key for the iphone so I can log into my machine?

    Comment by garrett....@gmail.com, Sep 8, 2007

    I just realized that when I ran ssh under the terminal it did in fact create a .ssh directory. I just copied over my private key made for the iphone and all works well!

    Comment by Lorin.Ko...@gmail.com, Sep 15, 2007

    ditto the request for cntrl-a in the pie window. I'm usin the vt100 from installer.app, and it's fantastic, except for the inabilty to use screen on the remote server I'm shelled into. doesn't have to be the pie window, any way to do cntrl a would be great, perhaps cntrl in the pie window followed by hitting 'a' would be fine.

    Comment by dinah.da...@gmail.com, Sep 15, 2007

    When ssh'd to read my e-mail, I have to use "mail" as my client. I would normally use Pine but I have to press Control-X to send it and I can't get it to work. Anyone out there use Pine to read their e-mail using iPhone.

    Comment by project member allen.po...@gmail.com, Sep 26, 2007

    Lorin.Kobashigawa, read the section called "Control Characters"

    Comment by andreas....@gmail.com, Sep 27, 2007

    I have the same problems as joshmhurd described on 20th Aug 2007. I've modified the Terminal binary file to an executable file. The Teminal starts but it shuts down after typing three characters to it. All Terminal versions have the same behaviour. Can someone please help us.

    Comment by project member allen.po...@gmail.com, Oct 1, 2007

    Does ssh-ing into your phone work? I suspect its a problem with your shell.

    Comment by Gamble....@gmail.com, Oct 2, 2007

    Any idea how to emulate the <esc> key for vi? What are people using for an editor for the vt100?

    Comment by greg.die...@gmail.com, Oct 4, 2007

    OK I am quite daft today. This one should look better. Google should add a preview option for impatient types who don't read markup help.

    For those asking about ^a for screen prefix. Consider changing your screen prefix to allow easier input on the iphone keyboard. I use ^[ which is mapped in the piemenu. To do this: just add escape ^[^[ to ~/.screenrc. In vi I just have to hit escape twice, which I usually do anyway. Or escape ZZ will map to capital Z which you rarely type into the term anyway. hitting ZZ twice will create a literal Z character. See screen man for more

    Comment by project member allen.po...@gmail.com, Oct 8, 2007

    Gamble.ken: <esc> is "^["

    Comment by hil...@gmail.com, Oct 9, 2007

    I have something that might seems to you all very basic: I use mobile terminal (installed via installer.app) and on my term I see someting lik that "[1m[7m#" etc. I understand it "escape" chars that for some reason the terminal can't show or some color darectives. how can i fix this ? changing TERM didnt help.

    Comment by schot...@gmail.com, Oct 14, 2007

    I've installed svn198 of the vt100 app. I've managed to scroll back into the history buffer a few times, but can't seem to do it reliably. How can I scroll?

    Comment by project member allen.po...@gmail.com, Oct 14, 2007

    Use the rightmost side of the screen.

    Comment by jonas.he...@gmail.com, Oct 22, 2007

    Is possible to turn the terminal to horizontal orientation? How? Sorry for my poor english!

    Comment by moises.b...@gmail.com, Oct 22, 2007

    The horizontal method would be very useful for everyone, however the keyboard should have a self hide, the possibility? tks

    Comment by micho...@gmail.com, Nov 5, 2007

    anyone found out how a proper backspace works?

    Comment by ajcpeder...@gmail.com, Nov 5, 2007

    @moises.baque

    I just accidently discovered that tapping once on the right side (the scroll area) hides the keyboard. At least with vt100 version svn 206, other versions with the pie menu might do the same.

    Comment by more...@culver.org, Nov 12, 2007

    Same problem as andreas... and joshmurd, i open it from my iPhone and when i type the third character it changes line and then goes to the iPhone main menu. Please tell me how to fix it PLEASE!!

    Comment by more...@culver.org, Nov 12, 2007

    Same problem as andreas... and joshmurd, i open it from my iPhone and when i type the third character it changes line and then goes to the iPhone main menu. Please tell me how to fix it PLEASE!!

    Comment by numat...@gmail.com, Nov 20, 2007

    Allen: You can't use the bullet-a to send a control-a to screen. Not sure why.

    I can ssh in from my desktop and use screen on the iphone and ctl-a works fine. So it's not an issue with the shell itself.

    Also, the new remember previous state feature is nice, but if you type "exit", you exit the shell and are stuck -- only way to get the terminal back to a prompt is to restart the iphone (or use another terminal or application capable of killing the process, I presume, though I haven't tried it)

    Comment by qeqe.onl...@gmail.com, Nov 21, 2007

    same problem as joshmurd, third character and it tells me process completed. HELP

    Comment by NetMage....@gmail.com, Nov 21, 2007

    If you have the three character problem, re-install the BSD Subsystem to fix.

    Comment by henZa.m...@gmail.com, Dec 10, 2007

    I created a motd file in /etc which works fine when I SSH into the phone but when I run Term-VT100 it pops up the message "Completed?". Any way to fix this?

    Comment by avoc...@gmail.com, Dec 14, 2007

    The installer version is svn198, which seems terribly out of shape...

    Questions: how to turn on vt100 ANSI color? And the way to remake screen's Ctrl-A to Esc didn't seem to work... Tried pressing the ^[ in the pie menu and then "d". No dice.

    Comment by avoc...@gmail.com, Dec 14, 2007

    changing to escape with ^[ on the pie menu works wonders.

    tip: if you want to detach processes that keep running when you quit Terminal.app, launch with "screen -m -d". this puts the screen in the background, not attached to any PTY. now you can just restore it with "screen -r" and work. when you quit terminal, the state is saved. next time you start Terminal.app, just type "screen -r" again and you're back. (I've set several aliases for these commands. iPhone's keyboard... nice, but not so nice :))

    this is great for starting persistent ssh-tunnels and proxies to the home (safe) network, while out roaming in internet cafés. hope that was helpful. screen is an amazing program that I didn't know existed until today :)

    Comment by sladen@gmail.com, Dec 20, 2007

    There is some funny business with C-a, it's broken in some subtle way. For the moment I'm using screen -D -R -A -evV as I'm likely to use C-v infrequently so it's okay for screen. C-[ is escape (as other people have noted, which causes other things to break if you use that and on a normal SSH session I use C-] .

    Comment by m4t...@gmail.com, Dec 28, 2007

    wheres the bookmarks feature? I accidently enabled it once now I can't get it to come up again.

    Comment by mike.forbes, Jan 6, 2008

    Is there any plan to implement other keyboard keys?

    I really need the ` key (backtick, on the same key as the tilde ~)

    Help? :)

    Comment by rmon...@gmail.com, Jan 26, 2008

    mornin'

    Just installed softupgrade 1.1.3, BSD 2.0 and now the left arrow and keyboard backspace will not show properly in the terminal.

    Both termv198 and v206 exhibit the same behavior...

    Any ideas?

    Comment by m4t...@gmail.com, Jan 27, 2008

    my backspace won't work after bad upgrade and in my shell vt100 doesn't seem to be enabled. When I run pine I get "your terminal of the type "network" is lacking certain features needed to run pine" WTF?

    Comment by m4t...@gmail.com, Jan 27, 2008

    Bsd upgrade. Freakin autocorrect.

    Comment by brandon....@gmail.com, Jan 27, 2008

    what this prog really needs is pageup/pagedown for curses apps like irssi

    Comment by yuv...@gmail.com, Jan 30, 2008

    Is there a fix to BSD 2 upgrade? Not a UNIX expert -:)

    Comment by namjam...@gmail.com, Feb 7, 2008

    Add Source installer : http://iphonebaidu.com/app/ Test iPhone - iPhone Simulator : http://iphonebaidu.com/test/ All Software for Apple MAC : http://iphonebaidu.com/mac-iphone/ All Software for Apple iPhone : http://iphonebaidu.com/mac-iphone/iphone.html

    Install iTransformy (.swf) view for iPhone : http://iphonebaidu.com/beta/ Forum iPhone : http://iphonebaidu.com/forum/

    Copyright © 2008 iPhone Baidu! Inc. All rights reserved

    Comment by cdegr...@gmail.com, Feb 19, 2008

    Is anyone else not able to enter <insert> mode while using Vi?

    I have tried with vt100 and 207, on an iTouch and a friends iPhone. On both devices after getting all the other fixes in place, nothing happens when you hit i while using vi or vim. Esc and :commands work ok, but I can't get into insert.

    The same thing happens when I SSH into the device so perhaps it's a subsystem problem and not MobileTerminal??

    Any advice?

    Comment by thorpeje...@gmail.com, Feb 23, 2008

    any chance of getting the --color option supported?

    Comment by thorpeje...@gmail.com, Feb 23, 2008

    I have the same problems with vi too. I started using Mobile TextEdit? instead.

    Comment by nguyenth...@gmail.com, Feb 24, 2008

    How to reboot by vt207 ??? My iphone FW 1.1.3

    Comment by bkocherov@gmail.com, Feb 25, 2008

    Press and hold home button over 5 seconds.

    Comment by thorpeje...@gmail.com, Mar 1, 2008

    Just upgraded firmware (clean) to 1.1.4, jailbroke w/ ziphone 2.5, added Cydia installer with its improve subsystem and installed the 209 mobileterminal through Cydia. Awesome! ls now automatically defaults to color!

    Comment by edwin.ng...@gmail.com, Mar 13, 2008

    it should say "tap once with two fingers to hide the on screen keyboard"

    Comment by carst...@gmail.com, Apr 28, 2008

    How do i bring up the round menu with CTRL+C ?

    Comment by gregory....@gmail.com, May 18, 2008

    You don't bring up the round menu. The round menu you see in the settings pannel is just a diagram to memorize the moves. You just slide your finger on the screen (not the keyboard part, though) toward the direction indicated. For example, up-right for CTRL+C.

    Comment by carst...@gmail.com, May 20, 2008

    Ahhh i see now! thanks alot, i now love this app much much more ! :)

    Comment by davewels...@gmail.com, Jul 30, 2008

    how do I switch TTYs? I see that 4 load at startup, ttys000 to ttys003. I know control is the bullet char, but what about alt? Is there are different way to switch between terminal screens?

    Comment by davewels...@gmail.com, Jul 30, 2008

    Found it: tap the clock in the upper right corner to move to the next terminal

    Comment by egendoml...@gmail.com, Aug 5, 2008

    Is there any documentation on this project other that this page? I'm wondering about the features like tapping different parts of the status bar and the swipe gestures.. and if there are more features I've missed.

    crashspeeder: Tip: Use /win in irssi instead of /window

    Does anyone know if there is any way of getting page up/page down?

    Comment by angryt...@gmail.com, Aug 6, 2008

    > Does anyone know if there is any way of getting page up/page down?

    I am wondering the same thing. I know alt+p and alt+n do the same thing, but I can't figure out how to do that either.

    How are you getting irssi to work anyways? For me it will not connect to any server. I am having to use bitchx.

    Also, in irssi, you could do "/alias . /window" which would make /. work instead of /window.

    Comment by angryt...@gmail.com, Aug 6, 2008

    Escape works as the meta key, as does alt on other terminals. I have been able to get pageup to work in Irssi and bitchx by pressing ctrl-[ ( ... swipe NE, then press '[' ... ). Then press 'p' for up or 'n' for down.

    The process is very difficult to repeat. How can I bind this somehow to a gesture or the pop-up context menu?

    Comment by soglpatr...@gmail.com, Aug 13, 2008

    when i click on the carrier logo the terminal always closes itself. is this meant to be like this?

    Comment by robin.zi...@gmail.com, Aug 27, 2008

    Thanks for the August 26th update! So nice...

    Comment by outkst0...@gmail.com, Sep 16, 2008

    wow, this is GREAT! thanks for the post catfacts3192!!

    Comment by goran.cr...@gmail.com, Sep 18, 2008

    Can you make a phone call from the cmdline ?

    Comment by V1nc...@gmail.com, Oct 8, 2008

    to goran.cronstrom can you ask stupid questions in command line?

    Comment by nealpobr...@gmail.com, Dec 13, 2008

    Hi, im planning on installing with firmware 2.2, is it working yet? many thanks!

    Comment by majk...@gmail.com, Mar 20, 2009

    How can I uninstall some application?

    apt-get remove didn't work :/

    Powered by Google Project Hosting