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.
Make sure your device has 10GB+ storage and 4GB+ RAM.
Scroll down the top menu, press
ACQUIRE WAKELOCK to keep Termux running in the background.
- Install proot-distro, pulseaudio, vim
- Install Proot Arch Linux (base system)
- Login to Arch Linux
(Optional) Go to mirror list to pick a fastest mirror in your country. Then edit
vi. Replace every link before
$repoto the mirror link.
- Change password of root
- Add a new user
user. Then add him to group
wheeland change his password.
- Add user
userto sudoers. Edit
vi, add following lines beneath
"root ALL=(ALL) ALL":
- Make sure you login to Arch as a normal user. Never login as root.
- Install Firefox, Noto Fonts, SSH, TigerVNC and other common tools
- Install yay - the AUR helper:
/etc/makepkg.confwith vim. Uncomment
-j+ (2 x phone processor cores). This could speed up AUR compiling time.
Install XFCE4 Desktop environment
- Setup timezone
and/etc/hosts` to rename your machine.
/etc/locale.gen, uncomment your language, for example
Congrats! Now you have installed Arch Linux on your Android phone! Read below to learn how to desktop enviornment manully.
Launch Termux X11 app, keep it opening in the background. Go back to Termux and type the following commands to run Termux X11.
- Login to Arch Linux as a normal user.
- Start desktop environment
- You shall see XFCE4 desktop showing at Termux X11. Tap flaoting window and revoke permission to make it go full screen.
We can use Termux Widget to start everything automatically. Thanks to Korean developers’ tutorial!
Go to system settings → all apps, turn on “Permit Drawing Over Other Apps” for Termux.
Restart Termux. Create a shortcut in Termux (not in proot-distro)
- Type these
- Make it executable.
Go to your home screen, long press and add widgets → select “Termux Widget”. You would see the shortcut we made is on the list.
Click “startproot_arch.sh” then the XFCE desktop would opened automatically.
Swipe down the notification bar, click
Preferencesof Termux X11. Then you can switch touch screen mode to simulating touchpad.
To use soft keyboard of phone in Termux X11, swipe the bar at the bottom and you will see a field for inputing texts.
If the fonts are too small in Termux X11, click Settings Manager at top-left → Appearance and change font size or select 2x window scaling.
To stop the XFCE session, press CTRL+C in Termux. Then logout of proot Arch Linux.