Ubuntu on proot-distro
Quick setup guide for running Ubuntu inside proot (on Termux) with a regular sudo user.
1. Install proot-distro and Ubuntu
Run in your host shell (Termux):
bash
apt update -y && apt upgrade -y
apt install proot-distro
proot-distro install ubuntu2. Log in as root
bash
proot-distro login ubuntu3. Install sudo and adduser
bash
apt update && apt install sudo adduser -y4. Create a user
Replace yourusername with your own name:
bash
adduser yourusernameYou will be prompted to set and confirm a password, followed by some optional fields (full name, room number, etc.). Press Enter to skip those.
5. Give the user sudo access
bash
usermod -aG sudo yourusername6. Log in as your user
Exit the root session (exit), then from the host shell:
bash
proot-distro login ubuntu --user yourusernameTest sudo:
bash
sudo whoami # should print: rootNotes
- Run
sudo apt update && sudo apt upgrade -yoccasionally to keep packages up to date. - This is the user dir you can access from host shell (Termux):
$PREFIX/var/lib/proot-distro/containers/ubuntu/rootfs/home/yourusername