Menu

How to Install Linux Distro on Android No Root

Taufik Nurhidayat
6 min read
#linux #tutorial

Although Android is Linux, it has limited functions, so we can install a Linux distro on Android even without rooting.

social_cards/page_1_pynvyg.png

Android is an operating system with Linux as its core or kernel. Although Android is Linux, some functions are limited, such as accessing the root directory to make changes to the system.

This is because Android security is a top priority, where phones with the Android OS are used daily and carried everywhere. It would be very dangerous if someone who is not a technology expert accidentally changed the system on their phone.

Brief Explanation of Linux

Linux is an open-source operating system just like Windows and Mac OS. The operating system itself has the ability to communicate between software and hardware. For example, a processor outputs input that will be received to be displayed on a monitor hardware.

Linux has been around since the 90s and is now spread everywhere around humans. Starting from computers, smartphones, smartwatches, cars, and maybe even refrigerators.

Why Install Linux Distro on Android?

As we mentioned at the beginning of the article, although Android is a Linux operating system, it has various functional limitations. To overcome these limitations, we have to root first, but this is very risky for the security of the Android phone itself.

But thanks to rapid technological developments, we can now install Linux distros on Android without rooting. This way, Android phones remain secure, but Linux functions can be used.

With a Linux distro installed on Android, we can do many things such as:

  1. Hacking: not all hacking activities are bad, one of them is analyzing the vulnerability of a server.
  2. Programming: with Linux, you can do front-end and back-end development on your Android smartphone.
  3. Running Linux Software: many amazing Linux software that you can use such as Inkscape, GIMP and other software.

How to Install Linux Distro on Android

Required Applications

Before we install the Linux distro, we need some necessary applications. Here’s the list.

1. Termux latest version

Termux Play Store - How to Install Linux Distro on Android

If we install Termux from the Play Store, that version has been abandoned and cannot be used for some functions. The Termux developers said this happened due to several Play Store policy factors.

Don’t worry, you can still install the latest version of Termux via GitHub or F-Droid, which you can get from the following links:

Although not from the Play Store, the application is safe and harmless.

2. Andronix

Andronix Play Store - How to Install Linux Distro on Android

There are many applications that can install Linux distros on Android, but Andronix is the best according to us. Some advantages we found in Andronix:

  1. Easy to use: all documentation is clear on their website:
  2. Many distro choices: various popular distros are available for installation, such as Kali Linux, Debian, Ubuntu, Manjaro, Fedora, Arch Linux, Void, and Alpine.
  3. Desktop Environment: for GUI display issues, Andronix has a variety of choices for that.

3. VNC Viewer (optional)

RealVNC Viewer - How to Install Linux Distro on Android

For the VNC Viewer application, you are free to use any. This application is needed to access the display of the Linux distro. You can also choose not to install it if you only want to use the CLI-only version of the Linux distro.

Linux Installation Process

Andronix initial display - How to Install Linux Distro on Android

If all the necessary applications have been installed, then open Andronix and you will see a display like the one above. Please select the Linux distro you want to install on your Android phone. We recommend choosing Ubuntu if you are a beginner, so tap on the orange-yellow icon.

The Modded OS version is a premium version that has been optimized to run on Android. You need to pay to use it. The regular version is also good!

Linux Distro Ubuntu Andronix - How to Install Linux Distro on Android

The image above is part of the Ubuntu page in Andronix. Please click “Continue” with the orange button, which will then change to something like the image below. It might be slightly different if the chosen Linux distro is not Ubuntu.

Select Linux Ubuntu version - How to Install Linux Distro on Android

Here we chose version 20.04, which is newer and has new features. Please click on that version, and the following display will appear.

Select Andronix Action - How to Install Linux Distro on Android

Then click the download button, which will proceed to the GUI display selection process as shown below.

Select Desktop Environment - How to Install Linux Distro on Android

There are several GUI options that can be installed: Desktop Environment, Window Manager, or CLI Only. Currently, we choose the desktop environment. Besides being accessible via CLI, it can also be accessed via VNC Viewer.

nurhidayat.web.id/Upload/IMG_20220923_083624_jcm6sw

Several desktop environments must also be selected in this section, depending on your preference. However, we chose XFCE, as it is lightweight and easy to use. After clicking, the command needed to install Linux on Android will be automatically copied, as indicated by the image below.

nurhidayat.web.id/Upload/IMG_20220923_085440_zbxcpj

Currently, the command has been copied to the clipboard on your phone. Now open Termux and paste the code by clicking and holding the screen, then the paste option will appear. The pasted command will be something like this:

echo "deb https://termux.mentality.rip/termux-main stable main" > $PREFIX/etc/apt/sources.list && cat $PREFIX/etc/apt/sources.list && pkg update -y && pkg install wget curl proot tar -y && wget https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Installer/Ubuntu20/ubuntu20-xfce.sh -O ubuntu20-xfce.sh && chmod +x ubuntu20-xfce.sh && bash ubuntu20-xfce.sh

or if in the Termux application, it will look like the following image.

nurhidayat.web.id/Upload/IMG_20220923_085727_zahn3l

Please press enter to start the installation process. Make sure your network signal is stable. Although the memory required is less than 4 GB, to be safe, clear 8 GB of memory so that it doesn’t freeze when running.

Wait until the installation process is complete. If it is, you can check by using the following command in the Termux application.

ls

If the file start-ubuntu20.sh exists, then you have successfully installed the Linux distro on your Android phone. The file name may vary depending on the distro and version chosen, but the characteristic is start-[distro_name][distro_version].sh.

nurhidayat.web.id/Upload/IMG_20220923_091018_xb7oju

We have performed the installation process before this article was written, so we are not displaying the process in Termux.

Access Linux Distro with VNC Viewer

Now we have successfully installed the Linux distro on Android, but to access the GUI display, we need the VNC Viewer application. Before that, make sure you run the Linux distro first with the following command in Termux.

./start-ubuntu20.sh

Because we chose another distro, just type ./start-[distro_name][distro_version].sh. Here’s the display.

nurhidayat.web.id/Upload/IMG_20220923_092305_fucpvw

Now run the VNC server on the installed Linux distro with the command vncserver-start. If it’s your first time, you will be instructed to set a password. Please follow the instructions. If you’re done, let’s proceed to the next step.

nurhidayat.web.id/Upload/IMG_20220923_092543_lcxbtv

Here we are presented with various screen resolution options. We chose number 4. Use the up and down arrow keys to move the selection or type a number between 1-5, then press enter.

nurhidayat.web.id/Upload/IMG_20220923_094652_x7htkn

If an image like the one above appears, then you have successfully started the VNC server. Now open the VNC Viewer application and press the + button as follows.

nurhidayat.web.id/Upload/IMG_20220923_095803_fzzxky

Then a popup will appear. Fill in the address with the address of the Linux VNC server that we installed earlier with localhost:1, then tap create.

nurhidayat.web.id/Upload/IMG_20220923_095918_jvwmtl

A green button with the text “Connect” will appear. Please tap that button. If a “Unencrypted Connection” warning appears, you can ignore it by tapping OK. Then a display for entering the password will appear as follows.

nurhidayat.web.id/Upload/IMG_20220923_100637_aqnuy3

Enter the password you set, then tap continue. If a display like the one below appears, then you have successfully accessed the Linux distro that has been installed on your Android.

nurhidayat.web.id/Upload/IMG_20220923_101223_ktilgb

Final Words

After successfully installing the Linux distro on Android without rooting, you can now access Linux according to your needs.

Many things can be done with Linux, but never use it for illegal purposes.