Install Ubuntu Linux on Android Using Termux and Proot (No Root)

16 min read Step‑by‑step guide to run a full Ubuntu Linux distribution on any Android device using Termux and Proot, without needing root access. October 09, 2026 05:00 How to Install Ubuntu Linux on Android Using Termux and Proot (No Root)

Why Run Ubuntu on Android?

Android ships with a Linux kernel, but the user‑space is heavily customized. For developers, power users, or anyone who wants a familiar desktop environment on a phone or tablet, installing a full Linux distribution opens up:

  • Access to apt packages that are not available as Android apps.
  • A consistent development environment across devices.
  • Ability to run command‑line tools, compilers, and scripts without rooting.

All of this can be achieved with Termux (a terminal emulator) and proot (a user‑space chroot implementation). The method works on Android 7.0+ and does not require unlocking the bootloader or obtaining root.

Note: The Ubuntu instance runs inside a sandbox. It cannot directly access hardware like the camera or Bluetooth unless you expose them manually, which is beyond the scope of this tutorial.

Before You Start

  • Device requirements: At least 2 GB of free storage (4 GB recommended) and 1 GB of RAM for a smooth experience.
  • Battery: Keep the device plugged in or ensure >50 % charge.
  • Internet: A stable Wi‑Fi connection for downloading packages (≈300 MB total).
  • Permissions: Allow Termux to access storage (Storage permission → Allow).

If you have a custom ROM or manufacturer‑specific UI, menu wording may differ slightly, but the steps remain the same.

Step 1 – Install Termux and Required Add‑ons

  1. Open the F‑Droid app store (recommended for the latest version) or Google Play Store.
  2. Search for Termux and install it.
  3. After installation, launch Termux. The first launch will set up the basic environment.
  4. Install the optional Termux:API add‑on if you plan to access device sensors later (skip if not needed).

Why use F‑Droid? The Play Store version may lag behind and miss recent updates that affect package compatibility.

Step 2 – Update Package Repositories

  1. In the Termux terminal, run:
    pkg update && pkg upgrade -y
  2. This refreshes the package list and upgrades existing Termux packages to the latest versions.

If you see Failure: Unable to fetch some archives, check your network or retry later.

Step 3 – Install Core Utilities

  1. Install proot, proot-distro, and wget:
    pkg install proot-distro wget -y
  2. proot-distro is a helper script that simplifies downloading and configuring Linux distributions.

These packages occupy only a few megabytes but are essential for the sandboxed environment.

Step 4 – Choose the Ubuntu Release

Ubuntu LTS (Long Term Support) releases receive security updates for five years, making them the safest choice. We will use Ubuntu 22.04 LTS (Jammy Jellyfish), but you can replace jammy with focal (20.04) if you prefer.

  1. List available distributions:
    proot-distro list
  2. You should see entries like ubuntu-22.04. If not, you can add a custom URL later.

Step 5 – Install Ubuntu

  1. Run the installation command:
    proot-distro install ubuntu-22.04
  2. The script downloads a compressed root filesystem (~150 MB) and extracts it to ~/.local/share/proot-distro/ubuntu-22.04.
  3. Wait for the process to finish. On a typical 4G connection, it takes 5‑10 minutes.

If you encounter Out of space, free up storage or choose a smaller Ubuntu variant (e.g., ubuntu-20.04-minimal).

Step 6 – Launch the Ubuntu Session

  1. Start the distro with:
    proot-distro login ubuntu-22.04
  2. You are now inside an Ubuntu shell, identified by a root@localhost:~# prompt.

Because the environment runs under proot, you have root privileges inside the container, but they do not affect the Android system.

Step 7 – Initial Ubuntu Configuration

These steps make the Ubuntu instance usable and prevent common pitfalls.

  1. Update the Ubuntu package index:
    apt update
  2. Upgrade installed packages:
    apt upgrade -y
  3. Create a non‑root user (optional but recommended):
    adduser androiduser
    usermod -aG sudo androiduser
    Replace androiduser with a name you prefer.
  4. Set a password for sudo (if you created a user):
    passwd androiduser
  5. Configure locale to avoid character‑set warnings:
    apt install locales -y
    locale-gen en_US.UTF-8
    update-locale LANG=en_US.UTF-8

After these commands, you can exit the root shell (exit) and log in as androiduser with su - androiduser.

Step 8 – Installing Common Packages

Depending on your use‑case, you may want a text editor, version control, or a Python environment.

  1. Install a lightweight editor (nano) and git:
    apt install nano git -y
  2. Install Python 3 and pip:
    apt install python3 python3-pip -y
  3. Optional: Install openssh-server if you want SSH access from another device:
    apt install openssh-server -y
    service ssh start
    Remember that the SSH daemon will listen only on the loopback interface unless you forward ports via Termux.

Step 9 – Accessing Files Between Android and Ubuntu

Termux provides a shared storage directory at /data/data/com.termux/files/home/storage. To make it visible inside Ubuntu:

  1. In Termux (outside the Ubuntu session), run:
    termux-setup-storage
    This creates ~/storage symlinks to ~/storage/downloads, ~/storage/shared, etc.
  2. Inside Ubuntu, bind‑mount the shared folder:
    mkdir -p /sdcard
    mount -t bind /data/data/com.termux/files/home/storage/shared /sdcard
  3. Now /sdcard inside Ubuntu points to your Android “Files” area. You can read/write files just like on a regular Linux system.

Warning: Changes made in /sdcard affect your Android storage directly. Deleting files here cannot be undone.

Step 10 – Making Ubuntu Start‑up Faster

Launching Ubuntu each time with proot-distro login incurs a small overhead. You can create a shortcut script to automate the bind‑mount and user login.

  1. Create a script file in Termux’s home directory:
    cat > start-ubuntu.sh <<'EOF'
    #!/data/data/com.termux/files/usr/bin/bash
    # Start Ubuntu, mount shared storage, and log in as androiduser
    proot-distro login ubuntu-22.04 --shared-tmp --user=root <<'INNER'
    mkdir -p /sdcard
    mount -t bind /data/data/com.termux/files/home/storage/shared /sdcard
    su - androiduser
    INNER
    EOF
    chmod +x start-ubuntu.sh
  2. Run it with ./start-ubuntu.sh. You will be dropped directly into the non‑root user shell.

This script also ensures the bind‑mount is recreated each session, which is necessary because proot discards mounts on exit.

Step 11 – Using a Graphical Desktop (Optional)

While the tutorial focuses on command‑line usage, many users enjoy a lightweight X desktop such as xfce4. The steps are optional and increase storage usage.

  1. Install X11 packages inside Ubuntu:
    apt install xfce4 xfce4-terminal dbus-x11 -y
  2. Install a VNC server (e.g., tigervnc-standalone-server):
    apt install tigervnc-standalone-server -y
  3. Set a VNC password:
    vncpasswd
  4. Start the VNC server on display :1:
    vncserver :1 -geometry 1280x720 -depth 24
  5. On Android, install a VNC client (e.g., VNC Viewer from the Play Store) and connect to 127.0.0.1:5901. The connection works because Termux forwards the localhost port.

Warning: Running a desktop consumes more RAM and battery. Close the VNC server (vncserver -kill :1) when you are done.

Step 12 – Updating the Ubuntu Distribution

Because the Ubuntu rootfs is just a set of packages, you can keep it up to date using the standard apt workflow.

  1. Enter the Ubuntu session (proot-distro login ubuntu-22.04).
  2. Run:
    apt update && apt full-upgrade -y
  3. Periodically clean the cache to free space:
    apt clean

If you ever need to reinstall the distro (e.g., corrupted filesystem), you can remove it with:

proot-distro remove ubuntu-22.04

Then repeat Step 5.

Troubleshooting Common Issues

1. proot-distro command not found

Make sure you installed the package in Step 3. Run pkg install proot-distro again. If the problem persists, close and reopen Termux to refresh the PATH.

2. Installation stalls or “Connection reset by peer”

These errors usually stem from network instability. Try the following:

  • Switch to a different Wi‑Fi network.
  • Use a wired connection via USB tethering.
  • Manually download the rootfs with wget and place it in ~/.local/share/proot-distro/ubuntu-22.04 (advanced).

3. mount: permission denied when binding /sdcard

Proot requires the --shared-tmp flag to allow bind mounts. Ensure your launch script includes it, as shown in Step 10.

4. “No space left on device” during package install

Ubuntu’s /var/cache/apt/archives can grow quickly. Clean it with apt clean or increase the storage allocated to Termux (Settings → Storage → Termux). Deleting unused Termux packages with pkg uninstall <pkg> also helps.

5. Keyboard input lag in VNC session

Latency often comes from the VNC client’s rendering mode. Switch to “Performance” mode in the Android VNC app, or reduce the display resolution in the vncserver command (e.g., -geometry 1024x600).

Advanced Tips

  • Expose additional Android directories: You can bind‑mount /sdcard/Download or any other folder by adding more mount -t bind lines in the launch script.
  • Use SSH tunneling: Forward port 2222 from Termux to the Ubuntu SSH daemon:
    ssh -p 2222 user@127.0.0.1
    This works after you start service ssh start inside Ubuntu.
  • Persist custom apt sources: Edit /etc/apt/sources.list inside Ubuntu to add PPAs or third‑party repositories, then run apt update as usual.
  • Run Docker (experimental): While full Docker requires kernel features unavailable in user space, you can use podman with the --privileged flag inside proot for limited container workloads.

When to Consider a Native Linux Device

If you find yourself regularly needing hardware acceleration, GPU‑intensive workloads, or low‑level networking tools, a dedicated Linux device (e.g., a Raspberry Pi or a cheap x86 mini‑PC) will provide better performance and fewer work‑arounds. The Termux‑Ubuntu combo shines for learning, scripting, and light development on the go.

Wrapping Up

By following the steps above, you now have a fully functional Ubuntu environment running side‑by‑side with Android, without ever rooting your device. You can install development tools, run server daemons, or simply experiment with Linux commands while on a train or in a coffee shop.

Remember to keep both Termux and the Ubuntu packages updated, back up any important files stored under /sdcard, and be mindful of storage consumption. With this setup, your Android phone becomes a portable Linux workstation—ready for the next coding challenge.

User Comments (0)

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