Install and Run a Full Linux Distribution on Android with Termux (No Root)

11 min read Step‑by‑step guide to install a complete Linux distro on any Android phone using Termux and proot‑distro, without rooting or flashing. October 05, 2026 03:30 How to Install and Run a Full Linux Distribution on Android Using Termux and Proot (No Root)

Why Run Linux on Android?

Android is built on the Linux kernel, but the user‑space environment is heavily customized. Installing a full Linux distribution gives you access to familiar command‑line tools, package managers (apt, yum, pacman), and even graphical desktop environments—all without unlocking the bootloader or voiding warranties. This tutorial shows you how to achieve that using Termux (a terminal emulator) and proot‑distro (a lightweight user‑space container).

What you’ll get: a working Linux shell (e.g., Ubuntu) that runs side‑by‑side with Android apps, persistent file storage, and optional VNC‑based GUI.

Before You Start

  • Device requirements: Android 7.0 (Nougat) or newer. Older versions may lack the required runtime libraries.
  • Storage: At least 2 GB free for a minimal Ubuntu install; more if you plan to add desktop packages.
  • Battery: Keep the phone charged above 50 % or plug it in; the installation can take 10–20 minutes.
  • Network: A stable Wi‑Fi connection is recommended for downloading packages.
  • Permissions: Termux will request storage access. Grant it when prompted (Settings > Apps > Termux > Permissions > Storage).

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

Step 1 – Install Termux

  1. Open the F‑Droid website on your Android device. F‑Droid provides the most up‑to‑date, ad‑free build of Termux.
  2. Tap Download APK, then install it. If you see a warning about “unknown sources,” enable it temporarily in Settings > Security > Install unknown apps > Your browser > Allow.
  3. Launch Termux from the app drawer. The first launch will initialize the environment and may ask to download additional data; allow it.

Do not install Termux from the Google Play Store. The Play Store version is no longer maintained and may lack critical updates.

Step 2 – Update Termux Packages

Termux ships with a minimal set of tools. Updating ensures compatibility with proot‑distro and the latest Linux packages.

pkg update && pkg upgrade -y

This command fetches the latest package lists and upgrades installed packages. Expect a few minutes of download time.

Step 3 – Install Required Utilities

We need proot (the container engine) and git (optional, for custom distro scripts).

pkg install proot-distro git -y

After installation, verify the versions:

proot-distro --version

You should see something like proot-distro 2.5.0. If the command fails, repeat the pkg install step.

Step 4 – Choose a Linux Distribution

proot-distro ships with a handful of ready‑made images: ubuntu, debian, archlinux, alpine, and fedora. For most users, ubuntu offers the best balance of familiarity and package availability.

List Available Distros

proot-distro list

The output will look like:

Available distros:
  alpine
  archlinux
  debian
  fedora
  ubuntu

Step 5 – Install the Distro

Installation downloads a compressed rootfs, extracts it, and creates a directory under ~/../usr/tmp/proot-distro. The process is fully offline after the download, so you can later start the distro without network access.

proot-distro install ubuntu

Typical output:

Downloading Ubuntu rootfs (approx. 150 MB)...
Extracting... done.
Installation finished.

If the download stalls, check your Wi‑Fi and retry. You can also specify a different mirror by editing ~/.proot-distro.conf, but the default works for most regions.

Step 6 – Launch the Linux Shell

Once installed, start the distro with:

proot-distro login ubuntu

You will be dropped into a regular Linux prompt, e.g. root@ubuntu:~#. At this point you have a fully functional Ubuntu environment running in user space.

What to Expect

  • The filesystem is isolated; changes persist across reboots of the distro but not across Termux updates that wipe its data directory.
  • You have root privileges inside the container, but they are confined to the container’s namespace – no real root on Android.
  • Network access works out of the box, using Android’s internet connection.

Step 7 – Basic Linux Setup

Run a few commands to make the environment comfortable.

  1. Update the package index inside Ubuntu:
  2. apt update
  3. Upgrade existing packages (optional but recommended):
  4. apt upgrade -y
  5. Install a text editor (nano) and curl for later tasks:
  6. apt install -y nano curl

These commands behave exactly as on a desktop Ubuntu system.

Step 8 – Access Android Files from Linux

Termux mounts the shared storage at /data/data/com.termux/files/home/storage. Inside the Linux container, this directory is available under /root/storage (the exact path may vary; you can always check with ls /root).

To enable the storage shortcut, run in Termux before launching the distro:

termux-setup-storage

After granting permission, you’ll see a storage folder inside your Termux home. When you proot-distro login ubuntu, you can navigate to /root/storage and see your Android downloads, pictures, etc.

Step 9 – Optional: Install a Graphical Desktop via VNC

If you want a GUI, you can install a lightweight desktop environment (e.g., XFCE) and serve it over VNC. This section is optional; the command‑line is fully functional on its own.

  1. Install the VNC server and XFCE packages:
  2. apt install -y xfce4 xfce4-terminal tightvncserver
  3. Set a VNC password (you’ll be prompted):
  4. vncpasswd
  5. Start the VNC server with a suitable geometry (e.g., 1280x720):
  6. vncserver :1 -geometry 1280x720 -depth 24
  7. On Android, install a VNC client such as VNC Viewer from the Play Store or F‑Droid.
  8. Connect to 127.0.0.1:5901. The :1 display maps to port 5901.

When you’re done, stop the VNC server to free resources:

vncserver -kill :1

Running a desktop consumes significant RAM and battery. On low‑end devices, you may experience lag or crashes.

Step 10 – Persisting Changes Across Termux Updates

Termux updates can wipe its private data directory, which would delete your Linux rootfs. To protect your work:

  • Periodically back up the distro directory: tar -czvf ubuntu-backup.tar.gz ~/.proot-distro/ubuntu (run from Termux, not inside the distro).
  • Store the backup on external SD card or cloud storage.
  • After a Termux update, restore with tar -xzvf ubuntu-backup.tar.gz -C ~/.proot-distro/.

Alternatively, keep a copy of the rootfs on a separate folder and reinstall with proot-distro install ubuntu --path /sdcard/ubuntu-rootfs if needed.

Step 11 – Common Issues and Troubleshooting

11.1 “proot‑distro: command not found”

This means the proot-distro package wasn’t installed correctly. Re‑run:

pkg install proot-distro -y

and ensure $PATH includes ~/.local/bin. You can add it manually:

echo 'export PATH=$PATH:~/.local/bin' >> ~/.bashrc && source ~/.bashrc

11.2 “Failed to download rootfs”

Possible causes:

  • Network block (e.g., captive portal). Open a browser, complete the login, then retry.
  • Insufficient storage. Free up space and retry.
  • Temporary server outage. Wait a few minutes and try again.

11.3 “Segmentation fault” when starting the distro

This usually indicates an incompatibility between the device’s CPU architecture (arm64 vs arm) and the downloaded rootfs. Verify your device architecture with:

uname -m

If you have an older 32‑bit arm device, install the ubuntu-armhf variant (if available) or choose alpine, which provides both armhf and aarch64 builds.

11.4 VNC connection refused

Make sure the VNC server is running inside the distro (check with ps aux | grep Xvnc). Also confirm you’re connecting to the correct localhost port (5901 for display :1). Some devices block loopback connections; in that case, use 127.0.0.1 explicitly instead of localhost.

Step 12 – Practical Use Cases

  • Development: Install compilers (gcc, clang), Python, Node.js, and use the familiar Linux toolchain on the go.
  • Network testing: Run nmap, curl, or ssh from the same environment you’d use on a laptop.
  • Learning Linux: Practice commands, edit config files, and experiment without a separate PC.
  • Portable scripts: Store Bash or Python scripts in the Linux home directory and execute them from anywhere on the device.

Step 13 – Removing the Distro (If You No Longer Need It)

To free up space, uninstall the distro cleanly:

proot-distro uninstall ubuntu

Then, optionally, remove Termux itself via Android Settings > Apps > Termux > Uninstall.

Wrapping Up

By following these steps you now have a fully functional Linux distribution running side‑by‑side with Android, all without rooting or flashing. The environment is portable, sandboxed, and can be extended with GUI tools or custom scripts. Remember to back up your distro folder regularly and keep Termux updated to benefit from security patches.

User Comments (0)

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