Installing Linux on an Android device can be a great way to expand the capabilities of your device and turn it into a portable Linux computer. With Linux, you can access a wide range of powerful tools and applications unavailable on Android, and customize your system to meet your specific needs.
There are several ways to install Linux on an Android device, but in this guide, we’ll focus on using Andronix and Termux.
What are Termux and Andronix?
- Andronix is an Android app that allows you to install various Linux distributions on your device.
- Termux is a terminal emulator that allows you to run Linux commands on your device.
With these two apps, you can easily install and run a Linux distro on your Android device, giving you access to a wide range of tools and applications.
Before you install Linux, you’ll first need to install F-Droid. The reason behind this is “F-Droid houses the latest stable versions of Termux that are now not released on the Play Store“.
F-Droid is an open-source Android app store that provides access to a wide range of free and open-source Android applications. F-Droid is different from other app stores, such as the Google Play Store, in that it only includes apps that are open-source and follow certain guidelines.
One of the main benefits of F-Droid is that it provides a trusted source for downloading open-source apps. All apps in the F-Droid store are reviewed and verified to ensure that they meet the standards for open-source software. This helps ensure that the apps you download from F-Droid are safe, secure, and high-quality.
To download F-Droid, click this link.
How to install Linux on Android
- First, you will need to download and install F-Droid.
- Open F-droid and download Termux.
- Open Playstore and download Andronix.
- Once both apps are installed, open Andronix and select the desired Linux distribution. There are several options; Including Ubuntu, Debian, Fedora, Kali Linux, Arch Linux, Manjaro, Void and Alpine. It’s completely free to install these.
On the bottom, you’ll be presented with another option, labelled “Andronix Modded OS.” These are modified Linux distros by the Andronix team that come with pre-installed software, themes, icons and optimized performance. However, to download any of the Modded OS, you’ll have to make a purchase. The good news is the price is reasonable and costs less than $5 for each distro.
Note: If you want the best performance and experience, a modded OS is the better option but not necessary.
- In my case, I already own the modded Ubuntu XFCE distro. So we’ll install that (the process should be the same for all distros.)
- Select Proceed
- Select Install
- Andronix will generate a command that you can copy
- Open Termux and Paste the command
- Allow storage permissions
- Wait for the installation to complete
- Once installation finishes, Termux will display a command that can be used to start Linux. In my case, to start Ubuntu XFCE the command is
./start-andronix.sh. The command will be different depending on the chosen distro.
- Now copy and paste that command in Termux to start Linux
- Set up a username and password
- Press enter
Set up VNC Server
A VNC (Virtual Network Computing) server is a computer program that allows you to remotely control another computer. It allows you to view and interact with the desktop of the remote computer as if you were sitting in front of it.
VNC is commonly used for remote support, remote access, and remote collaboration, and it is available for a wide range of operating systems, including Windows, Mac, Linux, and more. For this project, a VNC application is needed to view and interact with the operating system.
There are many different VNCs to download from the Play Store. One of the most popular is VNC Viewer, but they should all work the same way.
Once a VNC is installed, follow the steps below to add a new server.
How to set up a VNC server on the VNC Viewer app
- Click on the plus sign in the bottom right corner
- On Address enter
- Give it a name
- Now head back to Termux and start the server
- To start the server type
- Select resolution
- Head back to VNC Viewer
- Select your server
- You might get a warning (ignore that)
- Enter the password that you created earlier
- Click Continue
- Enjoy Linux
If you don’t want to use a VNC, consider checking this app from GitHub. Using a browser, AndroVNC allows you to connect without using a dedicated VNC client on the device.
What are the benefits of installing Linux on Android?
There are several reasons why someone might want to use Linux on their Android device:
- Development: Linux is a popular choice for developers, as it provides access to a wide range of tools and resources. Using Linux on an Android device can make it easier for developers to test and debug their applications.
- For the fun of it: It’s fascinating to think that a phone or even a tablet could run a desktop operating system.
- Productivity: Having access to a full desktop browser increases the productivity of any Android device.
- Privacy: Linux is known to be a safe and secure operating system.
- Customization: Linux allows users to customize their devices in ways that may not be possible with the Android operating system. This includes the ability to install and use different desktop environments and access the command line, which can be useful for advanced users.
- Security: Linux is generally considered to be more secure than other operating systems. This is because Linux is open source, which means that anyone can review the code and look for vulnerabilities.
Does Andronix Linux work with Samsung Dex?
Yes, once you successfully set up a VNC server, you can easily access the app through Samsung Dex. It works surprisingly works well, converting an already impressive desktop environment to a whole new level. To get the best experience, connect your phone to a desktop monitor or a TV, with a keyboard and mouse. If you have a Samsung Tablet, you can access Samsung Dex right from the screen.
Is this real Linux? What’s the catch
There are some limitations that you should be aware of when using Andronix.
- PC games don’t work: You won’t be able to run games on Steam, Wine or PlayOnLinux. The reason is smartphones use a different architecture (ARM) from Intel/AMD-based CPUs (x86). This also extends to other apps that are compiled for the x86 architecture. The only apps that will work are ARM-compiled apps.
- PRoot limitations: PRoot enables you to utilize an almost complete version of Linux within Termux, though certain limitations imposed by Android still apply. For a better Linux experience, you’ll have to root your phone and use Linux Deploy. To learn more about root, click this link.
- Development limitations: Andronix does not support compiling large chunks of code such as building an Android app, any software, or compiling kernels. This is because of PRoot environment limitations.
- Hardware limitations: Since there’s no root access with Andronix (and PRoot limitations), you won’t be able to mount/read any hardware such as drives or adapters. There’s also no hardware acceleration.
To learn more about the limitations of Andronix, click this link.