In This Post I Will Be Teaching You How To Install Sudo In Termux By Adding Some Simple Features In Termux. We Will Go Through Complete Road-map On What Is Sudo And How We Can Install It On Both Rooted And Non Rooted Method, I Will Show You How You Can Setup Sudo In Termux Without Rooting Your Device. First We Will See How To Install Sudo In Termux Without Rooting Your Device And Then We Will Install Sudo In Termux On A Rooted Device.
What Is Sudo?
Superuser Do Or Sudo Is The Administrative Permission Which Is Given To A User For A Full Administrative Privilege On A Device. The Superuser Permission Allows A User To Access Root Files And Edit Them. We Can Use Sudo In Kali Linux Using The Simple Sudo Command Before Every Command.
How To Install Sudo In Termux ? (Non Rooted Device).
We Will Install Sudo In Termux Without Root Using A Different Environment In Termux, We Will Install Proot Distro In Termux Then We Will Install An Operating System Like Ubuntu In It And Then We Will Install Sudo In It. So Whenever We Need Such A Tool That Will Require Sudo We Will Simply Switch To The Proot Distro And Install It. Follow The Below Steps One By One To Install Sudo In Termux:
Step 1: First Of All Open Termux On Your Android Device And Make Sure The Device Is Connected To The Internet.
Step 2: Update And Upgrade All The Termux Packages Using pkg update && pkg upgrade -y Command.
pkg update && pkg upgrade -yStep 3: Now Install Proot Distro In Termux Using pkg install proot-distro -y Command And Wait For It Complete.
pkg install proot-distro -y Step 4: Now We Will Install Ubuntu In The Proot Environment Using proot-distro install ubuntu Command And Wait For It To Download And Install In Termux.
proot-distro install ubuntu
Step 5: Now Login Into The Ubuntu Using pd login ubuntu Command.
pd login ubuntu
Step 6: Now Update The Ubuntu Packages Using apt update Command And Wait For It To Complete As It Will Take Longer Time Than Other Commands.
apt update
Step 7: Now Install Sudo In Termux Using apt install sudo Command And Then Type Y For Completing The Installation.
apt install sudo -y
We Have Completely Installed Sudo In Termux Without Rooting The Device. If You Have Followed Every Step In A Perfect Manner You Are Not Supposed To Fall In Any Error. After This Installation You Can Run And Install Most Of The Tools That Require Root Permission In Termux. Now We Will See How To Install Sudo In Termux In A Rooted Device.
Also Read : How To Install Nmap In Termux: Complete Setup & Usage Guide 2026
How To Install Sudo In Termux On A Rooted Device?
Unlike Installing Sudo On A Non Rooted Device, Installing Sudo In A Rooted Device Is A Much Easier Task And One Can Install It Using Basic Commands In Termux. Follow The Below Steps One By One To Install Sudo In Termux:
Step 1: First Of All Open Termux And Update And Upgrade It All Packages Using pkg update && pkg upgrade -y Command.
pkg update && pkg upgrade -yStep 2: Now Install Sudo In Termux Using pkg install tsu -y Command. A Dialogue Box Will Appear To Ask You To Give Permission Of Root To Termux
pkg install tsu -yStep 3: Click On Allow To Give Root Permissions To Termux And Enable Sudo In Termux.
This Was All About Installing Sudo In A Rooted Device In Termux. I Hope You Have Got This Completely.
Errors And Fixes:
- No Su Program Found On This Device: This Errors Mostly Hits When Running A Sudo Program In Termux. You Just Need To Login In To The Ubuntu Or Proot Distro Then Run The Tool Or Command To Resolve This Error.
- No Distro Found: Make Sure You Have Installed The Proot Distro Properly As Showed In The Above Tutorial In Termux.
- Unable To Resolve Hostname: This Means When You Are Inside The Proot Distro The System Is Unable To Resolve Its Hostname You Can Simply Type The Below Command To Resolve It.
echo "127.0.0.1 localhost" >> /etc/hosts
echo "127.0.1.1 $(hostname)" >> /etc/hostsConclusion:
Sudo Is The Most Powerful Command Line Utility As Far As I Know In Linux Or Termux Devices. In This Post We Have Discussed All About Sudo In Termux And Its Applications In Termux And Linux Operating Systems. I Have Completed Every Basic Detail About Sudo And Hope You Will Like It. If You Have Still Any Questions Regarding This Post Tell Me In The Comment Section. Thanks For Reading.







1 thought on “How To Install Sudo In Termux Without Root: Complete Guide 2026”