Install and Run Debian Linux on Android Using Termux and proot-distro (No Root)

10 min read Step‑by‑step guide to install a full Debian Linux environment on any Android device using Termux and the proot‑distro package, all without rooting. October 13, 2026 17:00 How to Install and Run Debian Linux on Android Using Termux and proot-distro (No Root)

Why run Debian on Android?

Android is built on the Linux kernel, but its user space is heavily customized for mobile use. Installing a full Debian environment gives you access to the vast Debian package repository, familiar command‑line tools, and the ability to run scripts or programs that are not packaged for Android. Because the method uses proot (a user‑space chroot implementation) inside Termux, it works on any device that can run the Play Store version of Termux, without requiring root.

Note: This tutorial assumes you have a stable Wi‑Fi connection, at least 2 GB of free storage, and Android 8.0 (Oreo) or newer. Older Android versions may lack the required runtime libraries.

Before you start

  • Backup important data. While the process does not touch internal partitions, accidental deletions can happen if you mistype commands.
  • Charge your device. Expect 30‑45 minutes of download and installation.
  • Enable storage permission for Termux. Go to Settings > Apps > Termux > Permissions and allow Storage. This lets Termux write the Debian filesystem to /data/data/com.termux/files/home.
  • Know your Android version. Menu wording can differ between manufacturers (e.g., Apps vs Applications).

Step 1 – Install Termux

  1. Open the Google Play Store (or F-Droid for the open‑source build).
  2. Search for Termux and install the official app.
  3. Launch Termux. The first launch will auto‑install the basic command‑line environment.

After the initial setup you should see a prompt that looks like ~ $. This is your Termux shell.

Step 2 – Update Termux packages

  1. Run the following command to refresh the package index and upgrade existing tools:
pkg update && pkg upgrade -y

The -y flag automatically answers “yes” to prompts, speeding up the process.

Step 3 – Install required utilities

  1. Install proot-distro, which simplifies the download and setup of Linux distributions:
pkg install proot-distro

If you plan to use a graphical desktop later, also install xfce4‑related packages inside Debian (we’ll cover that in Step 6). For now, only proot-distro is needed.

Step 4 – Download the Debian image

  1. List the available distributions:
proot-distro list

You should see entries like debian, ubuntu, etc. The debian entry points to the latest stable release.

  1. Install Debian:
proot-distro install debian

This command downloads a compressed root filesystem (≈150 MB) and extracts it under ~/.local/share/proot-distro/installed/debian. The download time depends on your connection.

Step 5 – Launch the Debian environment

  1. Start Debian with an interactive shell:
proot-distro login debian

You will be dropped into a Debian prompt that looks like root@debian:/#. You are now operating inside a full Debian userland, but still confined to Termux’s sandbox.

Step 6 – Basic Debian configuration

At this point you have a minimal Debian system. Let’s perform the essential setup so you can install regular packages and, optionally, a lightweight desktop.

  1. Update the Debian package index:
apt update
  1. Upgrade existing packages (recommended):
apt upgrade -y
  1. Set a non‑root user (optional but safer). Create a user called android:
adduser android

Follow the prompts to set a password and optional info. When done, switch to the new user:

su - android
  1. If you want a graphical desktop, install the Xfce desktop and a VNC server:
apt install -y xfce4 xfce4-terminal tightvncserver dbus-x11

After installation, run vncserver once to set a VNC password and create the initial configuration files.

Step 7 – Accessing the Debian shell from Termux directly

While you can stay inside proot-distro login debian, you may want to run a single command without entering an interactive shell. Use the exec sub‑command:

proot-distro exec debian -- ls -l /

This runs ls -l / inside Debian and returns to the Termux prompt.

Step 8 – Running graphical applications (optional)

Termux can forward X11 applications to an Android X server such as XServer XSDL. Below is a concise workflow.

  1. Install XServer XSDL from the Play Store.
  2. Start XServer XSDL; note the display number it shows (usually 0) and the TCP port (e.g., 6000).
  3. In the Debian shell, set the DISPLAY variable to point to the XServer:
export DISPLAY=127.0.0.1:0

If you are using a VNC server instead, you can connect with a VNC client on Android (e.g., VNC Viewer) to 127.0.0.1:5901 after starting vncserver :1.

  1. Test with a lightweight X app, such as xclock:
apt install -y x11-apps
xclock

The clock should appear on the XServer window.

Step 9 – Persisting data across sessions

All files you create inside the Debian rootfs are stored under Termux’s internal storage, so they survive reboots and Termux restarts. However, the proot-distro login command always boots a fresh session. To keep your environment consistent:

  • Never delete ~/.local/share/proot-distro/installed/debian unless you intend to reinstall.
  • If you need to back up the Debian filesystem, copy the entire installed/debian directory to external storage or cloud.

Step 10 – Updating Debian packages later

  1. Enter Debian (if you’re not already there): proot-distro login debian
  2. Run the standard Debian upgrade commands:
apt update && apt full-upgrade -y

Because the rootfs is just a set of files, the upgrade works exactly like on a regular PC.

Troubleshooting

1. proot-distro fails to download the image

Possible causes:

  • Internet connection blocked by a firewall or data‑saver mode. Disable data‑saver in Settings > Network & internet > Data Saver.
  • Play Store version of Termux is outdated. Install the latest version from F‑Droid.
  • Insufficient storage. Free at least 500 MB of internal space.

Solution: Run pkg install wget and manually download the Debian tarball from GitHub releases, then place it in ~/.local/share/proot-distro/archives and retry proot-distro install debian.

2. “Permission denied” when launching graphical apps

Android restricts network access to the loopback interface for non‑system apps. Ensure you grant Termux the Display over other apps permission (required for XServer XSDL). Also, set DISPLAY exactly as shown; using :0 instead of 127.0.0.1:0 can cause the app to try the wrong address.

3. Debian freezes or crashes after a long session

Termux runs in a constrained memory environment. If you notice OOM (out‑of‑memory) kills, consider:

  • Limiting the number of concurrently running processes.
  • Increasing Termux’s memory limit by editing ~/.termux/termux.properties (add extra-keys = ... – not directly related, but you can also enable allow-external-apps = true to let Termux use more RAM).
  • Running a lighter desktop environment (e.g., lxde instead of xfce4).

4. Unable to install packages because apt reports missing GPG keys

Sometimes the Debian repository keys are not present in the minimal rootfs. Fix it by reinstalling the debian-archive-keyring package:

apt install --reinstall debian-archive-keyring

Then run apt update again.

Safety and best‑practice tips

  • Never run untrusted scripts as root. Even though you are inside a sandbox, a malicious script could modify files inside the Termux home directory.
  • Keep Termux updated. Run pkg update && pkg upgrade -y regularly to receive security fixes for the underlying utilities.
  • Back up your Debian data. Use tar -czvf debian-backup.tar.gz / inside the Debian shell and copy the archive to external storage.
  • Consider using a dedicated user. Running everyday commands as a non‑root user reduces accidental system changes.

What you can do now

With Debian running on your Android device you can:

  • Compile and test Linux software on the go.
  • Run server‑type tools such as nginx, postgresql, or python scripts without a separate laptop.
  • Experiment with networking utilities (e.g., curl, ssh) while staying offline.
  • Learn Linux command‑line basics in a fully functional environment.

All of this is achieved without rooting, flashing, or voiding warranties—just a few minutes of setup and a willingness to type a few commands.

User Comments (0)

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