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

12 min read Step‑by‑step guide to install a full Ubuntu Linux distribution inside Termux on any Android device without rooting, with optional GUI via VNC. October 03, 2026 05:00 How to Install Ubuntu Linux on Android Using Termux and Proot (No Root)

Running a full Linux distro on an Android phone opens the door to a desktop‑class development environment, package managers, and tools that are otherwise unavailable. The combination of Termux (a lightweight terminal emulator) and proot-distro (a user‑space chroot implementation) lets you install Ubuntu without unlocking the bootloader or gaining root privileges.

Before you start

  • Device requirements: Android 7.0 (Nougat) or newer, at least 2 GB of RAM, and 2 GB of free internal storage. More RAM and storage improve performance, especially if you plan to run a graphical desktop.
  • Battery: Plug the device into a charger. The installation involves downloading large package archives and may run for 15‑30 minutes.
  • Network: Use a stable Wi‑Fi connection. Mobile data can work but may exceed data caps.
  • Permissions: Grant Termux storage access (Settings → Apps → Termux → Permissions → Storage) so the Linux file system can be stored on the shared ~/storage area.
  • Backup: The process does not touch your Android system, but it creates files in Termux’s private directory. A quick backup of important Termux data (if any) is harmless.

Step 1 – Install Termux

  1. Open the Google Play Store or F-Droid.
  2. Search for Termux and install the official version.
  3. Launch Termux. The first launch will automatically download its minimal package set.

Why this matters: Termux provides a Linux‑compatible userland (glibc‑like environment) that runs directly on Android’s Dalvik/ART runtime. All subsequent commands are executed inside this sandbox.

Step 2 – Update Termux and install required packages

pkg update && pkg upgrade -y
pkg install proot-distro wget curl git -y

The pkg command is Termux’s wrapper around apt. Updating ensures you have the latest package lists, while installing proot-distro gives you a simple interface to pull Linux images.

Step 3 – Choose and download an Ubuntu image

proot-distro ships with several ready‑made images (Ubuntu 20.04, 22.04, Debian, Alpine, etc.). For most users, the latest LTS release provides the best balance of stability and package availability.

# List available distributions
proot-distro list

# Install Ubuntu 22.04 (code name jammy)
proot-distro install ubuntu-22.04

The command downloads a compressed rootfs (~300 MB) and extracts it into ~/.local/share/proot-distro/installed/ubuntu-22.04. This may take a few minutes depending on your network speed.

Step 4 – Launch the Ubuntu environment

proot-distro login ubuntu-22.04

After the login command finishes, you are dropped into an Ubuntu shell. The prompt will change from u0_aXXX@localhost to something like root@ubuntu:~#. You are now operating inside a fully functional Ubuntu userland.

First‑time setup inside Ubuntu

  1. Update the package index:
    apt update
  2. Upgrade existing packages (optional but recommended):
    apt upgrade -y
  3. Install a basic set of tools you’ll likely need:
    apt install -y build-essential git curl wget nano

These commands behave exactly as they would on a regular Ubuntu installation. All files live inside the Termux private directory, so they cannot affect your Android system.

Step 5 – Optional: Set up a graphical desktop with VNC

Running a GUI inside Termux is optional but often desired for editors, browsers, or IDEs. The most straightforward method is to install a lightweight desktop environment (e.g., XFCE) and expose it via a VNC server.

5.1 Install XFCE and VNC server

# Inside the Ubuntu shell
apt install -y xfce4 xfce4-goodies tightvncserver

# Set a VNC password (you’ll be prompted)
vncpasswd

The password is stored in ~/.vnc/passwd and is required each time the server starts.

5.2 Create a VNC startup script

cat > ~/.vnc/xstartup <<'EOF'
#!/data/data/com.termux/files/usr/bin/sh
xrdb $HOME/.Xresources
startxfce4 &
EOF
chmod +x ~/.vnc/xstartup

This script tells the VNC server which desktop environment to launch.

5.3 Start the VNC server

# Start VNC on display :1 (port 5901)
vncserver :1 -geometry 1280x720 -depth 24

After a few seconds you’ll see a line like New 'X' desktop is ubuntu:1. The server is now listening on localhost:5901 inside the Ubuntu environment.

5.4 Connect from Android

  • Install a VNC client from the Play Store (e.g., VNC Viewer by RealVNC).
  • Open the client and create a new connection to 127.0.0.1:5901. Use the password you set earlier.
  • You should see the XFCE desktop. From here you can install additional GUI apps (e.g., apt install firefox).

Because the VNC server runs inside the proot container, the connection never leaves your device – it’s a local loopback.

Step 6 – Persisting data across sessions

When you exit the Ubuntu shell (exit or Ctrl+D), the filesystem stays intact. However, the VNC server does not survive a logout. To make it easy to restart, create a small wrapper script in Termux.

# Back in Termux (outside Ubuntu)
cat > ~/start-ubuntu.sh <<'EOF'
#!/data/data/com.termux/files/usr/bin/sh
proot-distro login ubuntu-22.04 --shared-tmp -- bash -c "
  # Start VNC if not already running
  if ! pgrep -x Xvnc >/dev/null; then
    vncserver :1 -geometry 1280x720 -depth 24
  fi
  exec bash
"
EOF
chmod +x ~/start-ubuntu.sh

Now, a single ~/start-ubuntu.sh call launches Ubuntu, starts VNC if needed, and drops you into a bash prompt.

Step 7 – Managing storage and external files

Termux can access shared storage via the ~/storage symlinks (download, documents, music, etc.). To make these directories visible inside Ubuntu, bind‑mount them when you log in.

# Create a custom login command that binds storage
proot-distro login ubuntu-22.04 --bind /data/data/com.termux/files/home/storage /root/storage

After logging in, you’ll find your Android downloads under /root/storage/downloads. This is handy for compiling source code, moving media, or editing documents with Linux tools.

Troubleshooting

Problem 1 – proot-distro: command not found

  • Ensure you installed proot-distro in Step 2. Run pkg install proot-distro again.
  • If the command still fails, restart Termux to reload the PATH variable.

Problem 2 – Installation stalls while downloading the Ubuntu image

  • Check your Wi‑Fi stability. A weak connection can cause the wget process to time out.
  • Use a different mirror by editing the ~/.local/share/proot-distro/ubuntu-22.04/rootfs.tar.xz URL. The proot-distro repo lists alternative mirrors on its GitHub page.

Problem 3 – VNC server reports “Address already in use”

  • The port :1 (5901) is already occupied, possibly by a previous VNC instance. List running VNC processes:
    ps -ef | grep Xvnc
  • Kill the stray process:
    kill -9 <PID>
  • Or start VNC on a different display, e.g., vncserver :2 (port 5902).

Problem 4 – Keyboard input is laggy in the VNC client

  • Reduce the VNC colour depth: vncserver :1 -depth 16.
  • Lower the resolution (e.g., -geometry 800x600) to decrease bandwidth.
  • Close background Android apps to free RAM; low memory can cause the proot process to be swapped.

Problem 5 – Cannot access Android storage from Ubuntu

  • Make sure you granted Termux storage permission (Settings → Apps → Termux → Permissions → Storage).
  • Run termux-setup-storage inside Termux before launching Ubuntu. This creates the ~/storage symlinks.
  • If you used a custom bind command, double‑check the source path: it must be the absolute Termux storage path (/data/data/com.termux/files/home/storage).

Performance considerations

  • CPU: Proot translates system calls in user space, which adds a small overhead (typically 5‑10 %). Heavy compilation tasks will run slower than on a native Linux machine.
  • RAM: Ubuntu itself consumes ~200 MB of RAM when idle. Keep at least 500 MB free for Android’s UI and background services.
  • Battery: Running a VNC desktop can drain the battery quickly. Disable the VNC server when not in use (vncserver -kill :1).

Cleaning up

If you ever need to remove the Ubuntu installation, the process is straightforward:

# From Termux (outside any proot session)
proot-distro uninstall ubuntu-22.04
# Optionally delete leftover VNC files
rm -rf ~/.vnc

This frees the space occupied by the rootfs (≈300 MB) and any user data stored inside the container.

What you can do next

  • Install development stacks: apt install python3-pip nodejs npm for scripting.
  • Run Docker‑compatible tools like podman (they work inside proot with some limitations).
  • Explore headless services such as ssh (install openssh-server) to access the Ubuntu shell from another device.
  • Combine Termux’s termux-api package with Ubuntu scripts to control Android hardware (camera, sensors) from Linux.

With Ubuntu running in Termux, your Android phone becomes a portable Linux workstation. All the steps above are reversible, require no rooting, and keep your Android system untouched – the perfect balance of power and safety.

User Comments (0)

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