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).

๐Ÿ“Š Why do you need Ubuntu on Android?
I want to try Linux
You need desktop apps on your phone
The hardware for the new Android is outdated
Experiment/curiosity
Another option

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 X11 or VNC

For installing Ubuntu in Termux follow these steps:

  1. Install Termux from F-Droid (the version from Google Play is outdated and not updated).
  2. Update the packages and install proot-distro:
    pkg update && pkg upgrade -y
    

    pkg install proot-distro -y

  3. Download the Ubuntu image (you can select the version by for example, 22.04 or 20.04):
    proot-distro install ubuntu
  4. 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

Done: 0 / 5
โš ๏ธ 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, nginx or Nextcloud) 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:

  1. Install Linux Deploy and open it.
  2. In settings, select:
    • Distribution: Ubuntu
    • Architecture: arm64 (for modern smartphones) or armhf (for old ones)
    • Installation type: File (for installation in an image) or Directory (for installation in a folder)
    • Image size: not less 4096 MB
  • Click โ€œInstallโ€ and wait for completion (may take 20-40 minutes).
  • After installation, click โ€œRunโ€ to activate the environment.
  • 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:

    1. 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 command fastboot flashing unlock.
    2. Download UBports Installer for your OS (Windows, Linux or macOS) from official website.
    3. Connect your phone in mode fastboot (usually hold down Volume down + Power with the device turned off).
    4. 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 and snapapplications
    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-api i termux-wifi-enable.
    • ๐Ÿ”น B chroot: activate interfaces manually:
      ifconfig eth0 up
      

      dhclient 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 gnome install lxde or openbox.
    • ๐Ÿ”น Increase the size of the swap file (if you have root):
      fallocate -l 1G /swapfile
      

      chmod 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 postgresql
      

      sudo systemctl stop apache2 mysql postgresql

    • ๐Ÿ”น Use lightweight desktop environments: apt install lxde or apt install xfce4.
    • ๐Ÿ”น Configure zram to compress memory (relevant for devices with 2โ€“4 GB of RAM):
      sudo apt install zram-config
      

      sudo 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 ~/sdcard
      

      sudo mount -o bind /storage/1234-5678 ~/sdcard

      (replace 1234-5678 with the real ID of your card, you can find it out with the command ls /storage).

    • ๐Ÿ”น Use rsync to synchronize files between Android and Ubuntu.

    ๐Ÿ”ง Connecting peripherals

    Ubuntu on Android can work with external devices:

    • ๐Ÿ”น Keyboard/mouse: connect via USB OTG or Bluetooth (Ubuntu Touch is supported out of the box).
    • ๐Ÿ”น Monitor: for Ubuntu Touch use convergence (adapter required USB-C โ†’ HDMI). In chroot/Termux, configure VNC with a screen resolution for monitor.
    • ๐Ÿ”น Gamepad: install sdl2 and configure via jstest-gtk.
    sudo apt install waydroid
    

    sudo 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 backup or 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, VNC or SSHif you do not use them all the time).
    • ๐Ÿ”น Use ufw to configure the firewall:
      sudo apt install ufw
      

      sudo 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 Waydroid to 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, Telegram or Signal have 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:

    1. Download stock firmware for your model (search on XDA Developers or official websites of manufacturers).
    2. Start the phone in mode fastboot (Volume down + Power).
    3. Flash the firmware with the command:
      fastboot flash system system.img
      

      fastboot 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. or OpenTTD) will launch without problems.
    • ๐ŸŽฎ Windows games You can try through Wine or Proton, 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 -y
      

      apt autoremove -y

    • ๐Ÿ”น Ubuntu Touch: updates come OTA (automatically) or through the command:
      sudo ubuntu-touch update
      

      sudo ubuntu-touch upgrade