It’s easy to forget that Android is a Linux-based operating system sometimes. But it is, and it retains some of that openness and flexibility that attracts people to the Linux platform.
As an example, you can actually install a full Linux distro on your Android device. We’ll demonstrate how to install Ubuntu on Android using an app called Linux Deploy, which will install the Linux desktop environment, but you can use this same method to install Debian or various other Linux distros.
Note: you’ll need to root your Android device before starting this process.
Install and Deploy Linux on Android
First, install BusyBox. This is a toolkit that unlocks your Android phone for various Linux commands that are essential to getting Ubuntu up and running. You won’t need to actively use this after installing it.
You’ll also need VNC Viewer, a remote desktop app that creates the window within which Ubuntu will run on your Android device. This is what you’ll ultimately be using to get Linux up and running.
Finally, you need to install Linux Deploy, which you’ll use to install Ubuntu (or one of several different versions of Linux, for that matter).
After installing Linux Deploy, open it and tap the icon with the three sliders (bottom-right corner).
Here you can select the Linux distro you want to install. (Just tap “Distribution,” then select the distro name – we went with Ubuntu.)
After that, scroll to the GUI section at the bottom, tap the “Enable” box and make sure “VNC” is selected under “Graphics subsystem.”
Once you’ve done that, you can also go into “GUI Settings” to set the resolution of Linux once it runs. Unless you have a tablet, the default 1920 x 1080 resolution on most smartphones is probably too high to practically use Linux, so we recommend lowering it to 1024×576 or 1152×648.
Finally, scroll back up about halfway until you find “User name” and “User password.” Make a note of them, or replace them with your own.
Those are all the settings you need to tweak. Go back to the Linux Deploy home screen, tap the three-dotted menu icon at the top-right and tap “Install.”
The installation may take from one to several minutes, depending on the speed of your smartphone.
Once it’s finished (denoted by the “<<<deploy” message at the bottom of the install log), tap Start at the bottom-left corner, then “OK.” Once you see the message “<<< Start” at the bottom of the log, Linux is deployed and running.
Run Linux on Android
But in order to actually see and use Linux, you need to use VNC Viewer. Open VNC Viewer, tap the green “+” icon at the bottom-right, then in the “New connection” box enter “localhost” as an address, and give the connection a name of your choice. (We went with “Linux.”) Click “Create.”
Tap the new connection in VNC Viewer to open it, and your Linux build should open up!
It won’t have anything installed on it by default, but you can go to the Terminal and sudo apt-get install
various software like you normally would in Linux.
Conclusion
That’s it. You now have a fully functional Linux distro on your Android device.
If at any point you decide that you don’t want Linux any more, it’s not a case of uninstalling Linux Deploy. Instead, you’ll need to use a file explorer with root access (we used Root Browser), find the directory “/data/user/0/ru.meefik.linuxdeploy/env” and delete it. (You can change the default Linux install directory in Linux Deploy’s settings menu).
Our latest tutorials delivered straight to your inbox