Running a full-fledged desktop operating system on an Android smartphone is not a fantasy, but a reality available to every user. Ubuntu Linux on Android opens up opportunities for developing, testing software, or simply experimenting with alternative OSs. But how does this work in practice? Is it possible to turn an ordinary smartphone into a mini-PC with Linux?
In this article we will analyze three working methods for installing Ubuntu from easy launch through the app to full installation on the internal memory of the device. You will learn what requirements are imposed on the device, what pitfalls await beginners, and how to avoid common mistakes. We will also evaluate the system performance using real examples of smartphones Samsung Galaxy S22 and Xiaomi Redmi Note 11.
1. Preparing a smartphone: what you need to know before installation
Before starting installation, it is important to understand: not all Android devices are equally compatible with Linux. The main factors influencing success:
- ๐น Processor architecture: Ubuntu runs on
ARM64(most modern smartphones) andx86(rare models, for example Asus ZenFone or Lenovo Yoga Tab). Check yours through the app CPU-Z. - ๐น Amount of RAM: Minimum 2 GB, but for comfortable operation 4+ GB is recommended. On devices with 6+ GB, Ubuntu will work almost like on a weak laptop.
- ๐น Free space: For a full installation, you will need 8-16 GB on the internal drive or microSD.
- ๐น root access: Optional for all methods, but expand the capabilities (for example, access to
/system).
Pay special attention device manufacturer. Smartphones Google Pixel, OnePlus i Xiaomi (with an unlocked bootloader) usually support Linux better than devices Samsung or Huawei with closed firmware. If your device is not included in list of compatible, this is not a death sentence - you just need more settings.
โ ๏ธ Attention: On some devices (for example, Samsung Exynos or MediaTek Helio) graphics drivers may not work. In this case, Ubuntu will start, but without hardware video acceleration, the interface will slow down.
2 Method. 1: Ubuntu through an application (without root)
The easiest method is to use specialized applications from Google Playthat emulate a Linux environment. The best options:
- ๐ง UserLAnd - supports Ubuntu, Debian, Kali Linux. Works without root, but requires configuration via
VNCorSSH. - ๐ง Termux + proot-distro โan easy option for running console commands. Suitable for server tasks.
- ๐ง Andronix โpaid application with pre-configured images of Ubuntu, Kubuntu, Manjaro.
Consider installation via UserLAnd:
- Download UserLAnd from Google Play and run.
- Select distribution Ubuntu, version (recommended
22.04 LTSor20.04 LTS). - Specify the user name and password (remember them!).
- Click
Installand wait for the image to download (~500 MB). - After installation, start the session via
VNC(for the graphical interface) orSSH(for terminal).
To connect via VNC:
- Install VNC Viewer on your smartphone.
- In UserLAnd start the VNC server with the command:
vncserver-start - In VNC Viewer connect to
localhost:5901(the password is the one you specified during installation).
Done! Now you have a full-fledged Ubuntu with a graphical interface, working in a window on Android. The disadvantage of the method is that the performance is limited by emulation, and some functions (for example, apt update) may work slowly.
Download UserLAnd and VNC Viewer|Select Ubuntu 22.04 LTS|Remember login/password|Connect via localhost:5901|Update packages with command sudo apt update-->
3. Method 2: Chroot environment (with or without root)
Chroot (change root) is a file system isolation method that allows you to run Linux apps directly on Android without rebooting the device. Advantages:
- ๐ Higher performance compared to emulation.
- ๐ง Full access to the Ubuntu file system (you can install packages via
apt). - ๐ฑ Works on most devices, even without root (with limitations).
For installation you will need:
- Application Termux (from F-Droid, and not from Google Play - there is an old version).
- Script
proot-distrofor managing chroot environments.
Instructions:
- Open Termux and run the commands in order:
pkg update && pkg upgradepkg install git
git clone https://github.com/termux/termux-root-packages.git
cd termux-root-packages
./scripts/setup-ubuntu.sh - Wait for the installation to complete (it will take 10-30 minutes depending on the Internet speed).
- Start Ubuntu with the command:
./startubuntu.sh
Now you are in the console Ubuntu! To install the graphical interface (for example, XFCE), run:
sudo apt updatesudo apt install xfce4 tightvncserver
vncserver :1 -geometry 1280x720 -depth 24
To connect, use VNC Viewer (address - localhost:5901). This method gives almost full-fledged Linux, but requires knowledge of the command line.
โ ๏ธ Attention: On devices without root, the chroot environment will work in an isolated folder /data/data/com.termux/files. This means that after deleting Termux all Ubuntu data will be lost!
4. internal memory (for advanced)
This method involves replacing Android with Ubuntu as the main one. OS installing Linux next to Android (dual boot). Suitable only for devices with an unlocked bootloader (unlocked bootloaderand root access) Risks:
- ๐ด Loss of warranty (on most devices).
- ๐ด Possible โbrickโ (turning into a โbrickโ) in case of an error.
- ๐ด Not all smartphone functions will work (camera, mobile network, sensors).
If you are ready to experiment, follow the instructions:
Step 1: Unlocking the bootloader
The process is different for each manufacturer:
- Xiaomi: Use Mi Unlock Tool (waiting 7-14 days after binding is required account).
- Google Pixel: Enable
OEM Unlockin the developer settings and runfastboot flashing unlock. - OnePlus/Samsung: You need special utilities (Odin for Samsung, MSM Tool for OnePlus).
Step 2: Installing custom recovery (TWRP)
Download the version TWRP for your model from the site twrp.meInstall via fastboot:
fastboot flash recovery twrp-3.7.0_9-0-your_device.img
fastboot reboot recovery
Step 3: Installing Ubuntu Touch or Ubuntu for ARM
There are two options:
- Ubuntu Touch (optimized for smartphones, but with limited software):
- Download the image from ubuntu-touch.io.
- Flash via TWRP.
- Use the project Linux Deploy or manual installation via
chroot. - Configure kernel with support
bind mountsto access/systemand/data.
| Method | Root required? | Performance | Complexity | Graphics support |
|---|---|---|---|---|
| UserLAnd | โ No | ๐ข Low | โญ Very easy | โ Yes (via VNC) |
| Termux + chroot | โ ๏ธ Desirable | ๐ Average | โญโญโญ Average | โ Yes (VNC setup) |
| Ubuntu Touch | โ Yes | ๐ High | โญโญโญโญ Difficult | โ Full (with drivers) |
| Full Ubuntu on ARM | โ Yes | ๐โก Very high | โญโญโญโญโญ Very difficult | โ ๏ธ Partial (depending on the kernel) |
โ ๏ธ Attention: On devices with processors Qualcomm Snapdragon (for example, Samsung Galaxy S21, Xiaomi Mi 11) Wi-Fi and Bluetooth may not work in Ubuntu due to closed drivers. The solution is to use an external USB adapter.
What to do if, after installing Ubuntu, the Android internal memory is not visible?
To access Android files from Ubuntu, you need to mount the partition /data manually. To do this:
1. In Termux or chroot, run:
sumkdir /sdcard/ubuntu-bind
mount -o bind /data /sdcard/ubuntu-bind
2. In Ubuntu, go to /sdcard/ubuntu-bind/media/0 โthe Android files will be there.
โ ๏ธ Be careful: changes in this section may damage Android!
5. Setting up Ubuntu after installation
After successful installation of Ubuntu, you will need basic setup for comfortable work:
1. System update
First of all, update the packages:
sudo apt update && sudo apt upgrade -y
sudo apt dist-upgrade -y
2. Installing a graphical interface (if not installed)
For a light interface, XFCE or LXQt:
sudo apt install xfce4 xfce4-goodies tightvncserver -y
3 is suitable. Network setup
If Wi-Fi or mobile data does not work:
- Check whether the device is detected with the command
ip a. - Install drivers (for Broadcom or Realtek you may need to manually compilation).
- For USB-ethernet adapters use
sudo dhclient eth0.
4. Performance optimization
To make Ubuntu work faster:
- ๐น Disable unnecessary services:
sudo systemctl disable apt-daily.service. - ๐น Use a light browser (
midoriorlinks2). - ๐น Set up the file (if there is not enough RAM): Settings โ Display โ Composer โ Disable
swap-file (if there is little RAM):sudo fallocate -l 1G /swapfilesudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
Settings โ Display โ Composer โ Disable. This will save up to 30% of processor resources.-->
6. Typical problems and their solutions
Even with correct installation, errors may occur. common:
1. Error "Failed to mount: Invalid argument" when running chroot
Cause: Incompatibility of the Android kernel with bind mounts.
Solution:
- Try use
prootinstead ofchroot. - Update the kernel via FrancoKernel or ElementalX (root required).
2. The sound does not work
In most cases, the sound is not working. Ubuntu on Android does not work due to lack of drivers ALSA for your chipset.
Workaround:
- Use Bluetooth headphones.
- Configure audio output via
PulseAudioon Android device (complicated, requires setuppactl).
3. Not enough disk space
If Ubuntu is installed on internal memory and space is running out:
- ๐น Move
/hometo microSD:sudo mv /home /sdcard/ubuntu-homesudo ln -s /sdcard/ubuntu-home /home - ๐น Clear the package cache:
sudo apt clean.
4. The touch screen or keyboard does not work
The problem is typical for Ubuntu Touch on unofficially supported devices.
Solution:
- Check if your device is in the compatibility list.
- If not, try manually compiling the kernel with drivers for your display.
Most problems with Ubuntu on Android are related to the lack of drivers for the specific hardware of smartphones. After installation, check whether there is experience of successful launch on your model on the forums XDA Developers or 4PDA.
7. Alternatives to Ubuntu: other Linux distributions for Android
Ubuntu is not the only option Depending on the tasks, you can consider:
| Distribution | Advantages | Disadvantages | Best for |
|---|---|---|---|
| Kali Linux | More than 600 security testing tools | Heavy, requires a lot places | Hackers, pentesters |
| Debian | Stable, minimalistic | Less pre-installed software | Server tasks |
| Arch Linux ARM | Flexibility, up-to-date packages | Complicated installation, requires knowledge | Enthusiasts, developers |
| Fedora | Good support for new software | Large image size | Development, testing |
| Alpine Linux | Very lightweight, secure | Minimalistic, few ready-made packages | Containers, embedded systems |
To install alternative distributions, use the same methods as for Ubuntu (via UserLAnd, Termux or Linux Deploy).For example, Kali Linux in Termux:
pkg install wgetwget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Scripts/Installer/Kali/kali.sh
bash kali.sh
8. Conclusion: is it worth installing Ubuntu on Android?
Ubuntu on a smartphone is an interesting experiment, but not a universal solution. data-i="279">not a universal solution
- โ
Pros:
- ๐น Ability to run Linux apps on the go (for example,
Python,GIMP,Blender). - ๐น Linux administration practice for beginners.
- ๐น Using a smartphone as a server (web, databases, torrent client).
- ๐น Ability to run Linux apps on the go (for example,
- โ Cons:
- ๐น Low performance on weak devices (less than 4 GB of RAM).
- ๐น Lack of drivers for the camera, GPS, mobile network.
- ๐น Difficulty setting up for beginners.
If you need Linux for development or training - methods with UserLAnd or Termux are ideal. If you want a complete replacement for Android -. consider Ubuntu Touch, but be prepared for limitations. For most users, the best option is use Linux on PCs, and leave Android for mobile tasks.
Ubuntu on Android is not a replacement for a desktop PC, but an addition for specific tasks. If you need performance, it is better to buy an inexpensive laptop or mini-PC (for example, Raspberry Pi 5).
FAQ: Frequently asked questions about installing Ubuntu on Android
Is it possible to install Ubuntu on Android without computer?
Yes, for methods with UserLAnd or Termux a computer is not needed. A smartphone and a stable Internet connection are enough. However, to completely replace Android with Ubuntu (via TWRP), you will need a PC to unlock the bootloader and firmware.
Will Ubuntu work on a smartphone with 2 GB of RAM?
Technically, yes, but the performance will be extremely low. The system will slow down even when you open the terminal. The recommended minimum is 4 GB of RAM. You can try Alpine Linux or Debian no GUI.
How to return Android if Ubuntu does not boot?
If you installed Ubuntu next to Android (dual boot), use TWRP to restore the backup. If you completely replaced Android, you will have to flash the original firmware. via fastboot or Odin (for Samsung). Look for instructions for your model at XDA Developers.
Is it possible to play Linux games on Ubuntu under Android?
Theoretically yes, but in practice it is almost impossible due to:
- Lack of drivers for the graphics accelerator (games will lag).
- Low performance on most smartphones.
- Problems with controls (the touch screen does not replace the keyboard and mouse).
Exception - simple 2D games like 0 A.D. or OpenTTD, which can be launched via X11.
How to connect a keyboard and mouse to Ubuntu on Android?
There are three ways:
- USB OTG: Connect the keyboard/mouse via an adapter. Most devices support this out of the box.
- Bluetooth: Pair devices in Android, then in Ubuntu use
bluetoothctlto connect. - On the network: For remote control use
sshorVNCfrom another devices.
For full operation, a USB keyboard with a hub is recommended (to also connect a mouse).