Installation Ubuntu on Android is not a fantasy, but a real way to turn a smartphone into a full-fledged working tool with a Linux environment. Depending on your goals, you can run Ubuntu from Android (via emulation or chroot), install it as dual boot, or even the official mobile version of the distribution. The last option is suitable for older devices that no longer support modern versions of Android, but are still capable of working as a mini-PC. in parallel from Android (via emulation or chroot), install it as a second system with dual loading, or even completely replace Android with Ubuntu Touch โ the official mobile version of the distribution. The latter option is suitable for older devices that can no longer handle modern versions of Android, but are still capable of working as a mini-PC.
In this article we will analyze all three approaches, evaluate their pros and cons, and also give clear instructions for each method. It is important to understand that installing Linux on a smartphone is not a process for beginners: it requires unlocking the bootloader, working with the command line and sometimes even soldering contacts (in the case of some older models). But if you are ready to experiment, the result will exceed your expectations: from a full-fledged terminal to running desktop applications like Samsung or Xiaomi). But if you are ready to experiment, the result will exceed your expectations: from a full-fledged terminal to launching desktop applications like GIMP or LibreOffice directly on your phone.
Before you start, check whether your device is supported. Most of the instructions in this article are universal, but some steps may vary for specific models. For example, for installing Ubuntu Touch, only certain devices are officially supported (mainly from Google Pixel, OnePlus and Fairphone).
1. Method 1: Ubuntu in Termux (the simplest and easiest). safe)
If you do not need a complete replacement of Android, but just terminal with Linux commands or the ability to run lightweight console utilities (like python3, git or ffmpeg), then Termux is an ideal solution. This is a terminal emulator for Android that allows you to install. packages from repositories Debian/Ubuntu without superuser rights (root).
Advantages of the method:
- ๐น Does not require unlocking the bootloader or
root-rights - ๐น Works on any Android 7.0+ (including modern smartphones)
- ๐น Can be removed at any time as a regular application
- ๐น Supports graphical applications via
X11orVNC
For installing Ubuntu in Termux follow these steps:
- Install Termux from F-Droid (the version from Google Play is outdated and not updated).
- Update the packages and install
proot-distro:pkg update && pkg upgrade -ypkg install proot-distro -y - Download the Ubuntu image (you can select the version by for example,
22.04or20.04):proot-distro install ubuntu - Launch Ubuntu:
proot-distro login ubuntu
Now you have a full-fledged Ubuntu console inside Android! any XFCE), do:
apt update && apt install -y xfce4 tightvncserver
vncserver -geometry 1280x720
Then connect to the server via any VNC client (for example, VNC Viewer) at localhost:5901.
โ๏ธ Preparing Termux for Ubuntu
โ ๏ธ Attention: In Termux, Ubuntu works in an isolated environment and does not have access to the hardware capabilities of the smartphone (camera, GPS, communication modules). To fully work with the hardware, you will need root-rights or alternative methods.
2. Method 2: Ubuntu via chroot (full system without replacement). Android)
Method chroot allows you to run Ubuntu in parallel with Android, but with access to the file system and some hardware components. Unlike Termux, it requires rootrights, but you get an almost full-fledged Linux system. This method is suitable for:
- ๐ฑ Launching servers (for example,
nginxorNextcloud) directly on the phone - ๐ฅ๏ธ Using desktop applications via
VNC/RDP - ๐ง Development for Linux (kernel compilation, operation with
Docker)
For installation you will need:
- ๐น A device with an unlocked bootloader and
rootrights - ๐น Application Linux Deploy (available on Google Play)
- ๐น Minimum 5 GB of free space on internal memory or SD card
Step-by-step guide:
- Install Linux Deploy and open it.
- In settings, select:
- Distribution:
Ubuntu - Architecture:
arm64(for modern smartphones) orarmhf(for old ones) - Installation type:
File(for installation in an image) orDirectory(for installation in a folder) - Image size: not less
4096 MB
- Distribution:
Ubuntu is now accessible via SSH (port default: 22) or through the terminal itself Linux Deploy. To install the GUI, do:
apt update && apt install -y lxde xrdp
service xrdp start
Then connect via RDP client (for example Microsoft Remote Desktop) to the address localhost:3389.
| Parameter | Termux | Linux Deploy (chroot) |
|---|---|---|
| Root required | โ No | โ Yes |
| Access to hardware | โ Limited | โ Partial (network interfaces, storage) |
| Performance | ๐ข Low (emulation) | ๐ High (native launch) |
| Delete | ๐๏ธ As an application | ๐ง Manually clearing files |
ip link set lo up
dhclient eth0
This will activate the loopback interface and obtain an IP address via DHCP.-->
3. Method 3: Ubuntu Touch (complete replacement for Android)
Ubuntu Touch is the official mobile version of Ubuntu, developed by the community UBports. It replaces Android completely, turning a smartphone into a device with own Linux interface and support. data-i="151">(connecting to a monitor as a desktop). This method is suitable for: convergence (connect to a monitor as a desktop). This method is suitable for:
- ๐ฑ Old devices that do not receive Android updates
- ๐ Users who privacy is important (no Google services)
- ๐ฅ๏ธ Enthusiasts who want full-fledged Linux on their phone
Officially, Ubuntu Touch supports a limited list of devices, including:
- ๐ฑ Google Pixel 3a, Pixel 3, Pixel 2
- ๐ฑ OnePlus One, OnePlus 2/3/3T
- ๐ฑ Fairphone 2/3/4
- ๐ฑ Xiaomi Redmi Note 7, Poco F1
The full list of supported devices can be found on the website UBports. If your model is not there, you can try unofficial ports (but this is risky!).
Installation instructions:
- Unlock the bootloader of your device (instructions differ for each brand). For example, Xiaomi you need to use
Mi Unlock Tool, and for Google Pixel the commandfastboot flashing unlock. - Download UBports Installer for your OS (Windows, Linux or macOS) from official website.
- Connect your phone in mode
fastboot(usually hold downVolume down + Powerwith the device turned off). - B UBports Installer select your model and follow the instructions of the app. The process will take 10-30. minutes.
After installation you will receive a system with:
- ๐ฑ Own launcher Lomiri (former Unity 8)
- ๐ฅ๏ธ Support convergence (connection to a monitor via USB-C/HDMI)
- ๐ Lack of Google services (can be replaced with MicroG)
- ๐ฆ The ability to install
.debpackages andsnapapplications
What to do if Ubuntu Touch does not see the SIM card?
On some devices (for example, Samsung Galaxy S3 Neo) mobile communications may not work due to the lack of drivers for the modem. Solutions:
1. Check if your device is on the list of officially supported devices with working connectivity.
2. Try unofficial assemblies with patches for modems (search on the forums XDA Developers or UBports).
3. Use your phone as a Wi-Fi device or connect an external USB modem.
โ ๏ธ Attention: Installing Ubuntu Touch erases all data from the device, including internal memory. Do this backup important files in advance! Also keep in mind that some functions (for example, a camera or a fingerprint sensor) may not work correctly or not work at all.
4. Comparison of methods: which one to choose?
The choice of installing Ubuntu on Android depends on your goals and the technical capabilities of the device. Below is a comparison table that will help you decide:
| Criterion | Termux | Linux Deploy (chroot) | Ubuntu Touch |
|---|---|---|---|
| Installation complexity | โญ (easy) | โญโญ (root required) | โญโญโญ (unlock bootloader) |
| Requires root | โ No | โ Yes | โ Yes (and unlocking) |
| Performance | ๐ข Low (emulation) | ๐ High (native launch) | ๐โก Maximum (full OS) |
| Access to hardware | โ Limited | โ Partial (networks, storage) | โ Full (like native OS) |
| Graphics support | โ Via VNC/X11 | โ Via VNC/RDP | โ Native interface |
| Risk of โscrappingโ | โ No | โ ๏ธ Low | โ ๏ธโ ๏ธ High (for errors) |
Recommendations for selection:
- ๐น If you need Linux for learning or light tasks (scripts, console utilities) - choose Termux.
- ๐น If you want a full-fledged Linux system next to Android (with access to files and networks) - use Linux Deploy.
- ๐น If you you old device and you are ready to experiment - try Ubuntu Touch.
Ubuntu Touch is the only way to get a full Linux interface on your phone, but it is only suitable for a limited list of devices and requires a complete flashing.
5. installation
Even if the installation was successful, you may encounter typical problems. Here are the most common problems and ways to solve them:
๐ด Problem: No Internet in Ubuntu (chroot/Termux)
If after starting Ubuntu there is no access to the network, check:
- ๐น B Termux: perform
pkg install termux-apiitermux-wifi-enable. - ๐น B chroot: activate interfaces manually:
ifconfig eth0 updhclient eth0 - ๐น If used
VNC/RDP, check if the Android firewall is blocking (for example, AFWall+).
๐ด Problem: Ubuntu Touch does not see the SIM card
This is a common problem on unofficial ports. Solutions:
- ๐น Check if your modem is supported in the official UBports forum.
- ๐น Try to manually load the kernel modules for the modem (skills required
adb). - ๐น Use your phone as a Wi-Fi hotspot or connect an external USB modem.
๐ด Problem: Low performance in Termux. data-i="252">install
Termux is slow due to emulation. To speed up:
- ๐น Disable unnecessary services:
sudo systemctl stop apache2 mysql(if installed). - ๐น Use easy alternatives: instead
gnomeinstalllxdeoropenbox. - ๐น Increase the size of the swap file (if you have root):
fallocate -l 1G /swapfilechmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
โ ๏ธ Attention: On some devices (for example, Samsung Exynos or MediaTek) there may be problems with graphics acceleration in chroot. In this case, try disabling hardware acceleration in the settings Linux Deploy or use software-rendering in X11.
6. Optimizing Ubuntu on Android
After installing Ubuntu (by any of the methods), it can be optimized for better performance. and convenience. Here are some tips:
๐ง Speed up work
- ๐น Disable unnecessary services:
sudo systemctl disable apache2 mysql postgresqlsudo systemctl stop apache2 mysql postgresql - ๐น Use lightweight desktop environments:
apt install lxdeorapt install xfce4. - ๐น Configure
zramto compress memory (relevant for devices with 2โ4 GB of RAM):sudo apt install zram-configsudo systemctl restart zram-config
๐ง Setting up storage
By default, Ubuntu in chroot or Termux has limited space. To expand it:
- ๐น Mount the SD card:
mkdir ~/sdcardsudo mount -o bind /storage/1234-5678 ~/sdcard(replace
1234-5678with the real ID of your card, you can find it out with the commandls /storage). - ๐น Use
rsyncto synchronize files between Android and Ubuntu.
๐ง Connecting peripherals
Ubuntu on Android can work with external devices:
- ๐น Keyboard/mouse: connect via
USB OTGorBluetooth(Ubuntu Touch is supported out of the box). - ๐น Monitor: for Ubuntu Touch use convergence (adapter required
USB-C โ HDMI). In chroot/Termux, configureVNCwith a screen resolution for monitor. - ๐น Gamepad: install
sdl2and configure viajstest-gtk.
sudo apt install waydroidsudo waydroid init
waydroid session start
This will allow you to run APK files in an isolated environment.-->
7. Security: risks and how to avoid them
Installing Ubuntu on Android is a process fraught with risks. Here are the main threats and ways to minimize them:
๐ก๏ธ Risk 1: Data loss
When installing Ubuntu Touch or working with chroot there is a chance of losing data on the internal drive. How to avoid:
- ๐น Always make a backup via
adb backupor TWRP. - ๐น Use a separate SD card for Ubuntu (if the device supports
adoptable storage).
๐ก๏ธ Risk 2: System vulnerabilities
Ubuntu on a phone may be less secure than on a PC. Precautions:
- ๐น Update packages regularly:
sudo apt update && sudo apt upgrade -y. - ๐น Disable unnecessary ports (for example,
VNCorSSHif you do not use them all the time). - ๐น Use
ufwto configure the firewall:sudo apt install ufwsudo ufw enable
sudo ufw allow 22/tcp # only if you need SSH
๐ก๏ธ Risk 3: "Burning" of the device
Incorrect Ubuntu Touch firmware or errors when working with fastboot can damage the phone inoperative. How to reduce risks:
- ๐น Follow the instructions exactly for your model (do not use universal guides).
- ๐น Check the integrity of the firmware (for example, via
sha256sum). - ๐น Have on hand stock firmware (the original Android firmware) for recovery.
โ ๏ธ Attention: On some devices (for example, Samsung with processors Exynos) incorrect firmware can lead to hardware locking of the bootloader (KNOX) In this case, you can restore the phone only through an official service center.
FAQ: Frequently asked questions about Ubuntu on Android
โ Is it possible to install Ubuntu on any Android smartphone?
No. Termux works on any device with Android 7.0+, but Ubuntu Touch only supports a limited list of models. For chroot (Linux Deploy) requires rootrights, which are not always available on new devices (for example, on Samsung with One UI 5+).
โ Will Google Play and Android applications work after installing Ubuntu Touch?
No, Ubuntu Touch is a separate OS, not compatible with .apkfiles. However, you can:
- ๐น Install
Waydroidto run Android applications in an isolated environment. - ๐น Use web versions of services (for example, Google Docs via a browser).
- ๐น Install alternatives from Ubuntu repositories (for example,
TelegramorSignalhave Linux versions).
โ How to return Android after installing Ubuntu Touch?
To return to Android, you need to flash the original firmware via fastboot or Odino (for SamsungInstructions:
- Download stock firmware for your model (search on XDA Developers or official websites of manufacturers).
- Start the phone in mode
fastboot(Volume down + Power). - Flash the firmware with the command:
fastboot flash system system.imgfastboot flash boot boot.img
fastboot reboot
For Samsung use Odino with file .tar.md5.
โ Is it possible to run games (for example, GTA or Minecraft) in Ubuntu on Android?
Technically yes, but with reservations:
- ๐ฎ Native Linux games (for example,
0 A.D.orOpenTTD) will launch without problems. - ๐ฎ Windows games You can try through
WineorProton, but the performance will be extremely low. - ๐ฎ Android games in Ubuntu Touch are launched only through
Waydroid(and then not all). - ๐ฅ For Minecraft there is a native Linux version, but it requires
OpenGLacceleration, which may not work in chroot.
For games it is better use Android emulators on PC or cloud services (for example, GeForce NOW).
โ How to update Ubuntu on Android?
The update method depends on the installation method:
- ๐น Termux: update the packages with the command
apt update && apt upgrade -y. - ๐น Linux Deploy (chroot): update the image through the app menu or manually:
apt update && apt dist-upgrade -yapt autoremove -y - ๐น Ubuntu Touch: updates come OTA (automatically) or through the command:
sudo ubuntu-touch updatesudo ubuntu-touch upgrade