Mobility

Use GNURoot to install a GNU/Linux distribution on your Android device

If you have a need to run a GNU/Linux distribution on your Android device, but you don't want to harm Android, Jack Wallen has the tool for you.

gnuroothero.jpg
Image: Jack Wallen

How many times have you been on the go and discovered that you needed to pull off some Linux-fu, but the only piece of tech you had was an Android device? Imagine if you were able to fire up a Linux command prompt on that device and make use of apt-get to install whatever command line tool you needed. Wget? No problem. Traceroute? Yes. Ssh? Absolutely. Just about any tool you can install on Linux, you can install within Android. Even some graphical apps will work (even though command line tools work best).

Before we get going, I should warn you that this isn't like installing a full-blown Linux distribution on Android. What you are effectively doing is installing a system that adds a Linux sub-system, which includes a lot of tools (including apt-get) and the ability to launch a minimal X Server. The developers managed to create a very handy system that isn't all that difficult to use and certainly has its place in an admin toolbox.

Let's get this baby up and running and see what it has to offer.

Installation

Fortunately, you do not need root to install GnuRoot. In this instance, the word "root" comes from the fact that this app actually installs a "fake" Linux root file system. With that in mind, the installation is as simple as any other. I've installed the Debian version of GNURoot. Here's how:

  1. Open the Google Play Store on your Android device
  2. Search for gnuroot debian
  3. Locate and tap the instance by Corbin Champion
  4. Tap Install
  5. Read the permissions listing
  6. If the permissions listing is acceptable, tap Accept
  7. Allow the installation to complete

Now, locate the launcher in your app drawer (or your home screen) and launch GNURoot.

Usage

From the main window (Figure A), you'll see two tabs (INSTALL/UPDATE and LAUNCH).

Figure A

Figure A
Image: Jack Wallen

The GNURoot main window, as seen on a Verizon-branded LG G3.

Before you do anything, you must first install the GNURoot Debian patches by tapping Install/Reinstall. This will open a new window (within GNURoot) and begin the process of installing the necessary components (Figure B).

Figure B

Figure B
Image: Jack Wallen

Installing the latest patch for GNURoot.

Next, you must tap Patch Installation (from the main window). This will install the necessary patches for you to run the X applications. Once that completes, go back to the main window and tap Install X Support. Upon completion of that, your GNURoot is ready to rock.

Launching a window

From the main screen, tap the LAUNCH tab. Here (Figure C) you'll find three buttons: Launch (will launch a command prompt window), Launch X (will launch a rudimentary X session), Reconnect to X (will reconnect to the X server).

Figure C

Figure C
Image: Jack Wallen

The GNURoot Launch tab.

Tap Launch, and you'll see a new bash prompt appear (Figure D). This is where you can install applications from the command line.

Figure D

Figure D
Image: Jack Wallen

The GNURoot command prompt ready for action.

Say you want to install the old-school Alpine text-based email client. To do that, type out apt-get install alpine. When prompted, tap y and the installation will commence. When the install finishes, you can then run the alpine command as if you were on a standard Linux machine and enjoy that old-school email feeling (Figure E).

Figure E

Figure F
Image: Jack Wallen

The Alpine email client.

In order to run X applications, you must go back to the main window and tap Launch X. Eventually, an xterm will open (Figure F), where you can run X Windows apps (if you've successfully installed one).

Figure F

Figure F
Image: Jack Wallen

A GNURoot X session.

If you're looking for a way to run a necessary Linux application on your non-rooted Android device, GNURoot might be the easiest method. Once you have the hang of it, it's quite painless, and it just might help gain you a bit more admin-centric usefulness from that Android device that you otherwise may not have had.

Are there GNU/Linux tools you require to get your job done that can be run on an Android device? Let us know in the discussion thread below.

Also see

About Jack Wallen

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website jackwallen.com.

Editor's Picks

Free Newsletters, In your Inbox