Okay, here's some more use(ful/less) information. It can be a real pain to type all these commands out in the terminal on your phone. Soft keyboards have never been as usable as a real keyboard is. The terminal is meant to save you time, and it really can, but not if you're fumbling to type the right thing. If you intend on typing in a few commands here and there, taking the time to set up adb and connect your phone is also a pain. It does, however, allow you to run commands from your computer. As I said, though, it's kind of a pain.
A nice solution is to set up ssh. Ssh is a secure, remote shell. It means you interact with your phone at the shell just like you do locally, but it's both remote (from any other host that can run the client) and it's secure (encrypted). So, you'll need two things to do this. You'll need an ssh server running on your phone, for starters. There is a way to do it for free, but if you want to save yourself the trouble, and want to have a nice little toggle widget, go grab quicksshd from the market. It's very easy to set up. Open it up, and set a password where prompted. Now, you need a ssh client on your computer. The standard for windows users is putty. You can google it. Go ahead and download that. Open it up, and type in the IP address of your phone. It's a lot faster and easier if you're on wifi, but it will work over 3g. Go ahead and connect, and you will be prompted for your username and password. Just type in root for the username, and then type in the password you set in quicksshd. By default, you'll be in sh, again.
There is a nice benefit to this, though. Quicksshd will set its path in /data/data/whateveritis as your home directory. So, right when you start ssh, run this command:
cp /sdcard/.bashrc ./
That will copy /sdcard/.bashrc to the current directory (remember "." is the current directory, and a directory as the destination for cp will just copy the file to that directory.). Now just need to make it launch bash rather than sh when you start. If you close your session, then go back to putty settings, select "SSH" under connection. For remote command, you can just type "bash" without quotes. Save that profile, and every time you run it, it will launch bash, and which will load your bashrc out of the quicksshd homedir.
Now that you have ssh running with bash, you'll see that it looks just like it did from your phone, with the same prompt and everything. You can now interact with your phone just like you can locally. This is very useful for a number of reasons beyond just making it easy to type commands.
So, it is much faster to do this over wifi, but it can still be done over 3g. That being said, if you decide to leave quicksshd running, that means you can ssh into your phone from where ever you are. There is one problem with this - your IP address on 3g will change every single time you disconnect/reconnect. The solution is to use
dyndns. I'm going to way oversimplify this because you can read about it elsewhere, but DNS is basically a map of domain names and IP addresses. When you use a web browser, you're typing in a domain name, which is later mapped to an IP address. Well, your IP address always changes, but you can have a public facing dns record for that constantly changing IP address by using this app. Create an account with dyndns, configure the app to use it, and you will always be able to access your phone via ssh by connecting to that same dyndns domain that you create. Now that I'm thinking about it, novox did an excellent write up about it in a thread some time ago. If you search for that, you can find a little more detail on it.