Fedora on proot-distro
Quick setup guide for running Fedora inside proot (on Termux) with a regular sudo user.
1. Install proot-distro and Fedora
Run in your host shell (Termux):
bash
apt update -y && apt upgrade -y
apt install proot-distro
proot-distro install fedora2. Log in as root
bash
proot-distro login fedora3. Update packages
bash
dnf update -y4. Create a user
Replace yourusername with your own name:
bash
useradd -m -G wheel yourusername5. Fix sudo permission
The sudo binary needs the SUID bit set to work under proot:
bash
chmod 4755 /usr/bin/sudo6. Set a password
bash
passwd yourusernameYou will be prompted to enter and confirm the new password.
7. Log in as your user
Exit the root session (exit), then from the host shell:
bash
proot-distro login fedora --user yourusernameTest sudo:
bash
sudo whoami # should print: rootNotes
- Run
sudo dnf update -yoccasionally to keep packages up to date. - Members of the
wheelgroup get sudo access by default on Fedora, so novisudoedit is needed. - If
sudocomplains about permissions, double-check thatchmod 4755 /usr/bin/sudowas run as root. - This is the user dir you can access from host shell (Termux):
$PREFIX/var/lib/proot-distro/containers/fedora/rootfs/home/yourusername