Linux-For-Android install guide
Full Linux desktop on Android via Termux: install, boot, and fix the common pitfalls. Repo ↗
What you need
An Android phone and Termux installed from F-Droid. Do not use the Play Store build of Termux, it is outdated and breaks the installer.
About 4 GB of free storage for a comfortable desktop distro, plus a Wi-Fi connection for the first install.
Install
Paste this into Termux. The script walks you through distro choice, display settings, and user setup:
pkg update -y && pkg install git -y
git clone https://github.com/pdev-labs/Linux-For-Android.git
cd Linux-For-Android
chmod +x install_linux.sh
./install_linux.shPick a distro
Ubuntu and Debian suit first-timers. Arch and Void suit minimal setups. Kali suits security tooling. Fedora and OpenSUSE sit in the middle.
Choose VNC for maximum compatibility or Termux:X11 for smoother hardware-accelerated graphics. Pick 720p on small phones, 1080p on large ones.
Daily use
After setup you never run the installer again. Boot with start-linux, shut everything down cleanly with stop-linux. With several distros installed, the boot menu asks which one to start.
Default login is user ubuntu for both sudo and VNC. Change it on first boot.
The manager menu also handles updates, SSH on port 8022, audio fixes, and portable .tar.gz exports you can share with friends.
start-linux # boot (asks which distro if several)
stop-linux # stop desktop, display and audioTroubleshooting
Termux killed with signal 9 on Android 12 and later: this is the phantom process killer. Enable Developer options and turn off the background process limit, or keep Termux in the foreground during heavy tasks.
No audio: run the audio fixer from the manager menu, it restarts PulseAudio bound to TCP.
Black screen on connect: stop-linux, then boot again and re-check the VNC address and password shown in Termux.
First boot checklist
Run the updater once from the manager menu so every package starts current. Then open a browser and play a video to confirm VirGL acceleration is active; choppy playback means you booted VNC instead of Termux:X11.
Change the default user password immediately, and test SSH from your computer with ssh user@phone-ip -p 8022 before you need it.
Backup and portability
Export from the manager menu writes a .tar.gz of the whole distro into the Android Downloads folder. Copy it off the phone as your backup.
To clone a setup onto another phone, drop that file into its Downloads folder and use Import. The new machine gets your packages, configs, and desktop exactly as they were.