How to run commands as root in Connectbot? My phone is rooted CM7 and Superuser.apk has Connectbot in the allowed list.  Titanium backup reports that it has root access, to prove that I actually have root working.  I seem to remember being able to run commands in Connectbot as root in the past.

But now, I go into Connectbot → Local, and try to run a command using sudo, and it just says "permission denied".  No pop-up or anything.   Same for the Terminal Emulator app.  How do I run commands as root?
The su binary works just like it does on Linux; it runs all commands that follow as root until you type exit (or terminate the process, etc.). sudo &lt;command&gt; essentially does:

su
&lt;command&gt;
exit


Android doesn't normally include sudo, so If you wish to launch commands like you would with sudo, the syntax is as follows:

su -c "[command_1;command_2;...;command_N]"


For example, to get a list of installed packages in "root" mode, you can either do 

$ su
# pm list packages
# ........ &lt;listing of packages scrolls down&gt; ......
# exit


or

$ su -c "pm list packages;exit"