Main image of article How to Run a Linux Terminal on Your Android

Lots of developers, programmers and systems people run SSH, allowing them access to their remote Linux systems. While a remote terminal on your Linux notebook is useful if you have your notebook at hand, having the capability on your Android smartphone is pretty darned convenient, especially if you are two floors and 10 offices away from your desk and notebook. Today, we'll talk about what you need to get it going. Most Linux systems, especially desktops, start SSH by default these days. If not, simply install it on the machine you want to remotely log into, using your favorite package manager. While there are many Android SSH clients you can run, I like the one called ConnectBot, which can be downloaded from Google Play. Click here to find Linux jobs.

Using ConnectBot

Download and open ConnectBot. The screen will open with a user name input box and keyboard at the bottom. Enter a user name and remote host, the same way you'd do it for any other SSH session. There's also a drop-down to the left of the user name box where you can choose SSH, telnet or local. Enter your password to log into your remote Linux machine. ConnectBot comes up with a font size that's way too small. Click the Menu button, choose “Force Re-Size” and enter “50” in the left hand input box. Hit the Resize key and the text will be quite usable. At this point you can type commands into the remote Linux command line and use your finger to scroll the screen up or down. One big problem I have with ConnectBot is the issue of arrow keys. I use arrow keys all the time to recall past commands. It's a huge time saver, most certainly on a tiny Galaxy S3 soft keyboard. Alas, no luck with a standard Android build, but there are ways around the problem. One is to use CTRL-P to recall the previous command. Tap the screen above the keyboard and CTRL-ESC, and the keyboard buttons will appear. Simply tap the screen and select the CTRL button, then the letter “P.”  The same thing can also be accomplished with “!!”. Take a look at the history command, then recall old commands with '!' and the history number. Standard Linux stuff. Of course, you can also find old commands with “!?”. Part of the command, such as “!?cpu”, might retrieve the following line, which I use occasionally.

sudo sh -c "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"

Additional Techniques

Another app, the Hacker's Keyboard, actually has arrow keys. It's also available in Google Play. Download and open the app. When the screen opens, touch the Enable Keyboard button, then check the “Hacker's Keyboard” box. Tap the Android home key to return to the home screen. Next, go to the Android settings, then Language, and input and check the “Hacker's Keyboard” box. Now, move back up to and tap the Default keyboard under Language and Input. Choose the “Hacker Keyboard” radio button. Go back down and tap the “Hacker's Keyboard” settings button. Make sure the “Keyboard Mode” entries are set to “Full 5-Row Layout.” Otherwise, you won't see any arrows. In this configuration, the keys are quite small, so it might take some getting used to. But, hey, there are arrow keys. Return to ConnectBot and you should have now have a keyboard with arrow keys. You may have to log in again. It may not be a perfect approach, but it lets you get things done when you don’t have your standard tools at hand.

Related Posts