Install Ubuntu Linux on Android with Termux – No Root Required

13 min read Learn how to run a full Ubuntu Linux environment on your Android device using Termux and proot, without rooting. Step‑by‑step guide with setup, usage, and troubleshooting. October 01, 2026 00:30 How to Install Ubuntu Linux on Android Using Termux and Proot (No Root)

Before you start

Running Ubuntu on Android does not require root, but it does need a few basic conditions. Satisfying them up front saves you from interruptions later.

  • Android version: 7.0 (Nougat) or newer. Older versions lack the required filesystem features.
  • Free storage: At least 2 GB for the base Ubuntu image; 4 GB+ is recommended if you plan to install a desktop environment.
  • Internet connection: Required to download Termux, packages, and the Ubuntu rootfs.
  • Power source: Plug the device into a charger. The installation can take 10‑20 minutes of continuous CPU work.
  • Termux permissions: You will need to grant Termux access to shared storage (via termux-setup-storage).

All commands below are typed inside Termux. If you see a # prompt, it means you are using the root user inside the Ubuntu chroot, not the Android system root.

Step 1 – Install Termux

  1. Open the F‑Droid page for Termux and tap Install. (The Play Store version is no longer updated; F‑Droid provides the latest builds.)
  2. Launch Termux from the app drawer. The first launch will finish extracting the base files; this may take a minute.
  3. Update the package repository and core utilities:
    pkg update && pkg upgrade -y
  4. Install essential tools that will be used later:
    pkg install proot-distro wget tar -y

Do not run apt-get directly in Termux. Termux uses its own pkg front‑end; mixing Debian/Ubuntu commands with Termux can corrupt the environment.

Step 2 – Prepare Termux storage access

  1. Run the storage setup script:
    termux-setup-storage
    You will be asked to allow Termux to access your files. Accept the permission dialog.
  2. After the script finishes, you will see a new ~/storage directory with symlinks to Downloads, DCIM, etc. This is where you can keep any Linux files you want to share with Android.

Step 3 – Install Ubuntu with proot-distro

proot-distro is a lightweight wrapper that downloads a Linux root filesystem and runs it under proot, which emulates the required chroot/syscall environment without needing root privileges.

  1. List the available distributions (optional, just to see what’s offered):
    proot-distro list
  2. Install Ubuntu 22.04 (the LTS release). You can pick another version by changing the name, e.g., ubuntu-20.04.
    proot-distro install ubuntu-22.04
    The script downloads a ~400 MB compressed rootfs, extracts it, and sets up a launch wrapper. Expect a few minutes of network and CPU activity.
  3. Verify the installation by launching a shell inside the new Ubuntu environment:
    proot-distro login ubuntu-22.04
    You should see a prompt that looks like root@localhost:~#. You are now inside Ubuntu.

If you run out of space during download, you can change the download directory by setting the PROOT_DISTRIBUTION_ROOTFS_DIR environment variable before the install command.

Step 4 – Basic Ubuntu configuration

At this point you have a bare Ubuntu system. It lacks the usual package lists and locales, so perform a quick setup.

  1. Update the package index and upgrade existing packages:
    apt update && apt upgrade -y
  2. Install a few helpful utilities:
    apt install -y wget curl git vim sudo
  3. Create a non‑root user for everyday work (optional but recommended):
    adduser androiduser
    usermod -aG sudo androiduser
    When prompted, set a password you can remember. You can then switch to this user with su - androiduser.
  4. Set the locale to avoid “locale not supported” warnings:
    apt install -y locales
    locale-gen en_US.UTF-8
    update-locale LANG=en_US.UTF-8

Step 5 – Optional: Install a graphical desktop (Xfce) and VNC server

Running a GUI makes the Ubuntu environment feel more like a traditional Linux PC. Android does not have an X server, so we use VNC to forward the display.

  1. Install the Xfce desktop and a lightweight VNC server (tigervnc):
    apt install -y xfce4 xfce4-terminal tigervnc-standalone-server
  2. Set a VNC password (you will be prompted for a view‑only password – you can leave it blank):
    vncpasswd
  3. Create a startup script so the VNC server launches Xfce automatically. Save the following as ~/.vnc/xstartup (replace nano with your editor of choice):
    #!/bin/sh
    xrdb $HOME/.Xresources
    startxfce4 &
    Make it executable:
    chmod +x ~/.vnc/xstartup
  4. Start the VNC server on display :1 with a resolution of 1280×720 (adjust as you like):
    vncserver :1 -geometry 1280x720 -depth 24
    You will see a line like New 'androiduser@hostname:1' desktop is androiduser@hostname:1. Keep note of the port number – VNC uses 5900 + display number, so this will be 5901.
  5. On the Android side, install a VNC viewer app (e.g., VNC Viewer or bVNC).
  6. Open the VNC client, create a new connection to 127.0.0.1:5901, and connect using the password you set earlier. You should now see the Xfce desktop running inside Ubuntu.

Leaving the VNC server running consumes CPU and battery. When you are finished, stop it with vncserver -kill :1 inside Ubuntu.

Step 6 – Using Ubuntu from Termux without a GUI

If you only need command‑line tools, you can stay inside the terminal. Here are a few common tasks:

  • Package management: apt install package-name
  • Python development: apt install python3 python3-pip then pip3 install --user package
  • Git repositories: git clone https://github.com/… – the cloned files will live inside the Ubuntu filesystem under /root or /home/androiduser.
  • Access Android files: Inside Ubuntu, the Android shared storage is mounted at /data/data/com.termux/files/home/storage. You can symlink a convenient folder:
    ln -s /data/data/com.termux/files/home/storage/downloads ~/Downloads

Step 7 – Persisting data across sessions

The Ubuntu rootfs lives inside Termux's private data directory (~/../usr/var/lib/proot-distro/installed/ubuntu-22.04). It is preserved as long as you do not uninstall Termux or clear its data. To back up the whole Linux environment:

  1. Exit the Ubuntu shell (type exit or press Ctrl+D).
  2. Compress the distribution directory:
    tar -czvf ubuntu-backup.tar.gz -C $HOME/../usr/var/lib/proot-distro/installed/ubuntu-22.04 .
  3. Move the archive to a safe location (e.g., Google Drive, external SD card) using Termux's mv or a file manager.

To restore, extract the archive back into the same path and run proot-distro login ubuntu-22.04.

Troubleshooting common issues

1. “proot: failed to execve” error

This usually means the downloaded rootfs is corrupted or the device’s architecture does not match the image (e.g., trying to run an x86_64 Ubuntu on an ARM64 phone). Verify the architecture with uname -m inside Termux. Use the matching distribution name, such as ubuntu-22.04-arm64 if available.

2. VNC shows a black screen

  • Make sure the xstartup script is executable and contains the startxfce4 line.
  • Check that the VNC server is running on the same display number you are connecting to (5901 for :1).
  • Some Android devices restrict loopback connections. If 127.0.0.1 fails, try localhost or the device’s local IP address (e.g., 192.168.1.42:5901) while both Termux and the VNC client are on the same Wi‑Fi network.

3. “No space left on device” during installation

Termux stores files on internal storage by default. If your internal partition is small, move the proot-distro root directory to an external SD card:

mkdir -p /sdcard/termux-proot
export PROOT_DISTRIBUTION_ROOTFS_DIR=/sdcard/termux-proot
proot-distro install ubuntu-22.04

Remember to update the PROOT_DISTRIBUTION_ROOTFS_DIR variable each time you start Termux (add the export line to ~/.bashrc).

4. Keyboard input lag in VNC

VNC performance depends on the chosen encoding. In vncserver you can enable the Tight encoding for better speed:

vncserver :1 -geometry 1280x720 -depth 24 -SecurityTypes None -xstartup ~/.vnc/xstartup -rfbport 5901 -rfbwait 5000 -localhost no -tight

Alternatively, try a different VNC server such as tigervnc-standalone-server with the -SecurityTypes None flag if you are on a trusted private network.

Performance and battery considerations

Running a full Linux distro is CPU‑intensive. Here are some practical tips to keep the experience smooth:

  • Limit background services: Disable unnecessary Ubuntu daemons (e.g., systemd isn’t fully functional under proot, so services won’t start automatically).
  • Use a lightweight desktop: Xfce, LXDE, or even a window manager like Openbox consumes far less RAM than GNOME or KDE.
  • Adjust VNC quality: Most VNC clients let you lower the color depth (e.g., 16‑bit) to reduce network traffic and battery drain.
  • Close the VNC session when not in use: Killing the VNC server frees the CPU and stops the display loop.

Security notes

Even though the Linux environment runs in user space, treat it like any other machine:

  • Never run untrusted binaries as root inside Ubuntu unless you understand the risk.
  • Set a strong VNC password; VNC traffic is not encrypted by default. If you need encryption, tunnel the VNC connection through ssh (install openssh in Ubuntu and forward the port).
  • Remember that files you create inside Ubuntu are stored inside Termux’s private area, which other Android apps cannot read without root. However, any file you symlink to /storage is accessible to other apps, so keep sensitive data inside the Linux home directory.

What to do after the installation

Now that Ubuntu is running, you can use it for a variety of tasks that would otherwise require a PC:

  • Compile source code with gcc or make.
  • Run a local web server (e.g., python -m http.server) and test web pages on the same device.
  • Use ssh to connect to other machines, or run an ssh daemon to allow remote access to your phone’s Linux shell.
  • Install language runtimes (Node.js, Ruby, Go) and experiment with scripts on the go.

Because the environment lives entirely in user space, you can uninstall it at any time without affecting the Android system: simply run proot-distro remove ubuntu-22.04 and delete the associated files.

Summary

By leveraging Termux and proot-distro, you can spin up a fully functional Ubuntu Linux installation on virtually any Android phone without rooting. The process consists of installing Termux, pulling the Ubuntu rootfs, performing a quick configuration, and optionally adding a VNC‑based desktop. With the troubleshooting tips and performance advice above, you should be able to keep the Linux environment stable, secure, and useful for development, testing, or just plain curiosity.

User Comments (0)

Add Comment
We'll never share your email with anyone else.