Running a full Linux distro inside Android consumes storage and RAM. Make sure you have at least 2 GB of free internal storage and a device that stays above 50 % charge during the installation. A stable Wi‑Fi connection is required to download packages.
/data/data/com.termux/files.Termux and install the official app. F-Droid often provides the most up‑to‑date build.After the initial setup you should see a $ prompt. This is the Linux shell provided by Termux.
pkg update && pkg upgrade -y. This updates the package index and upgrades existing tools.pkg install proot-distro wget curl git -y.When the command finishes you have a clean, up‑to‑date environment ready for Proot.
proot-distro list. You should see an entry called debian.proot-distro install debian. The script will fetch a compressed rootfs (~300 MB) and unpack it under ~/.local/share/proot-distro/installed/debian.After installation you can verify the presence of the rootfs folder using ls ~/.local/share/proot-distro/installed.
proot-distro login debian. The command drops you into a # root prompt inside the Debian container.cat /etc/os-release to confirm you are inside Debian. You should see something like PRETTY_NAME="Debian GNU/Linux 11 (bullseye)".At this point you have a fully functional Debian system. It runs in user space, so no root privileges on the Android side are required.
apt update.apt upgrade -y. This may install a few hundred megabytes; ensure you have enough storage.apt install -y nano git curl wget sudo
adduser androiduser
usermod -aG sudo androiduser
Then switch to that user with su - androiduser.Using a non‑root user prevents accidental changes to the container’s system files and mirrors the typical Linux workflow.
Termux automatically mounts your shared storage at /storage/emulated/0. Inside Debian this path is visible as /root/storage/emulated/0 (or /home/androiduser/storage/emulated/0 if you created a user). You can create a symbolic link for convenience:
ln -s /root/storage/emulated/0 ~/android_storage
Now ~/android_storage points to your phone’s internal storage, allowing you to edit scripts, read documents, or compile code directly from the Debian shell.
Debian is headless by default. If you need a graphical interface (e.g., to run a text editor with mouse support), follow these steps.
apt install -y xfce4 xfce4-terminal tightvncserver
vncpasswd.~/.vnc/xstartup with the following content:
#!/bin/sh
xrdb $HOME/.Xresources
startxfce4 &
Make it executable: chmod +x ~/.vnc/xstartup.vncserver :1 -geometry 1280x720 -depth 24.localhost:5901. You should see the XFCE desktop.When you are done, stop the server with vncserver -kill :1. Remember that the GUI consumes additional RAM, so close it when not in use.
Termux stores the Debian rootfs in its private data directory, which survives device reboots. However, the container is not automatically started. To launch Debian with a single tap you can create a Termux widget or shortcut:
termux-create-package (optional) or simply create a script file ~/start-debian.sh containing:
#!/data/data/com.termux/files/usr/bin/bash
proot-distro login debian
chmod +x ~/start-debian.sh.start-debian.sh. Tapping the widget now opens the Debian shell directly.Common issue: "proot-distro: command not found" – This means the proot-distro package was not installed. Re‑run pkg install proot-distro and verify the binary exists at ~/.local/bin/proot-distro.
Download stalls or checksum errors – The rootfs is fetched from a CDN. Switch from mobile data to a stable Wi‑Fi connection, or manually download the tarball with wget and install it using proot-distro install debian --file /path/to/rootfs.tar.gz.
VNC shows a black screen – Ensure the xstartup script is executable and contains the startxfce4 & line. Also verify that the display geometry matches your device screen.
Out‑of‑memory (OOM) kills – Debian runs in user space, but Android may reclaim memory under pressure. Close other apps before launching a GUI, or limit VNC geometry to a smaller size (e.g., 800x600).
python3, nodejs, or golang directly inside Debian.ssh to access the container from another computer: apt install openssh-server and forward port 2222 via Termux’s sshd.podman (experimental) for container workloads.With a full Debian environment on your Android device you now have a portable, scriptable Linux workstation that works on any phone or tablet without rooting.









