🇹🇼 中文版
Proot-distro of Termux allows you to install Linux distributions on your Android phone. No root required. Proot-distros are containers, which are limited but still possible to run some dekstop appliations in it.

In this article, I will guide you to install Proot Arch Linux ARM with a Desktop Environment from scratch (kind of) in Termux.
You would have to install the whole system from command lines.
WARNINGS:
- Proot-distro is not a fully GNU/Linux system. It’s a container.
- You cannot start systemd services in proot.
- Make sure your device has 10GB+ storage and 4GB+ RAM.
Install Termux.
Install RealVNC Viewer.
Disable Phantom killing on Android 12+ devices.
Scroll down the top menu, press ACQUIRE WAKELOCK
to keep Termux running in the background.
- Install proot-distro, pulseaudio, vim
1
2
| pkg update
pkg install proot-distro pulseaudio, vim
|
- Edit .
profile
with vim
:
- Add these lines:
1
2
3
| # Start pulse auadio server after launching Termux
pulseaudio --start --load="module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" --exit-idle-time=-1
pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1
|
- Install Proot Arch Linux (base system)
1
| proot-distro install archlinux
|
- Login to Arch Linux
1
| proot-distro login archlinux
|
(Optional) Go to mirror list to pick a fastest mirror in your country. Then edit /etc/pacman.d/mirrorlist
with vi
. Replace every link before $repo
to the mirror link.
Update system
- Change password of root
- Add a new user
ivon
. Then add him to group wheel
and change his password.
1
2
3
| pacman -S sudo vim
useradd -m -g users -G wheel,audio,video,storage -s /bin/bash ivon
passwd ivon
|
- Add user
ivon
to sudoers. Edit/etc/sudoers
with vi
, add following lines beneath"root ALL=(ALL) ALL"
:
- Make sure you login to Arch as a normal user. Never login as root.
- Edit
~/.profile
with vi
, add following lines:
1
2
| # Start pulse audio server in proot after login
export PULSE_SERVER=127.0.0.1 && pulseaudio --start --disable-shm=1 --exit-idle-time=-1
|
- Install Firefox, Noto Fonts, SSH, TigerVNC and other common tools
1
| sudo pacman -S vim firefox networkmanager xorg xorg-server pulseaudio noto-fonts git openssh fakeroot base-devel tigervnc neofetch
|
- Install yay - the AUR helper:
1
| sudo pacman -S --needed git base-devel && git clone https://aur.archlinux.org/yay.git && cd yay && makepkg -si
|
Edit /etc/makepkg.conf
with vim. Uncomment MAKEFLAGS="-j2"
. Change -j2
to -j
+ (2 x phone processor cores). This could speed up AUR compiling time.
Install XFCE4 Desktop environment
1
| sudo pacman -S xfce4 xfce4-goodies lightdm
|
- Or install KDE Plasma (WARNING: It’s huge)
1
2
| sudo pacman -S plasma-meta
yay -S tablet-mode
|
VNC server is the easiet way to connect to the desktop envirment. By the way it’s possible to login from VNC client on PC in the same network.
- Create a password for vncserver
- Add following lines to
~/.vnc/config
1
2
3
4
5
| # The session we want to start
session=xfce4
# Screen resolution
geometry=1920x1080
localhost
|
- Add following lines to
~/.vnc/xstartup
, so it will execute XFCE4 after starting vncserver.
1
2
3
4
5
6
| #!/bin/bash
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export PULSE_SERVER=127.0.0.1 && pulseaudio --start --disable-shm=1 --exit-idle-time=-1
# Execute XFCE4
dbus-launch --exit-with-session startxfce4
|
- Setup timezone
1
| sudo ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
|
Edit ``/etc/hostnameand
/etc/hosts` to rename your machine.
Edit /etc/locale.gen
, uncomment your language, for example en_US.UTF-8
Generating locales
1
2
| sudo locale-gen
echo "LANG=en_US.UTF-8" >> /etc/locale.conf
|
Congrats! Now you have installed Arch Linux on your Android phone! Read below to learn how to log in and log out.
- Launch Termux, login to Arch Linux as a normal user.
1
| proot-distro login --user ivon archlinux
|
- Starting a vncserver, the ports starts from 5900.
Launch RealVNC Viewer, add new connectionlocalhost:5901
and type in password to connect to the vncserver。

Click i
to adjust picture quality. Now you are good to go, try to run some desktop programs!

To log out, first close VNC Viewer. Then go back to Termux, press CTRL+Z
to stop vncserver. Finally type exit
to log out from the proot-distro。
- Run this command in Proot-distro:
1
| export PULSE_SERVER=127.0.0.1 && pulseaudio --start --disable-shm=1 --exit-idle-time=-1
|
- Run this command in Termux (not in proot!)
1
2
| pulseaudio --start --load="module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" --exit-idle-time=-1
pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1
|
Proot-distro will automatically bind mount Android internal storage to /sdcard
directory.
Backup your proot system:
1
| proot-distro backup --output archbackup.tar.gz archlinux
|
Restore your proot system:
1
| proot-distro restore archbackup.tar.gz
|
Why? Because the performance would be better.
See: How to use Termux-X11 - The XWayand server on Android phone