Skip to content

Instantly share code, notes, and snippets.

@GabrielMMelo
Created January 22, 2019 12:33
Show Gist options
  • Save GabrielMMelo/0e146f32d73978bf0d0a06786bcbc96c to your computer and use it in GitHub Desktop.
Save GabrielMMelo/0e146f32d73978bf0d0a06786bcbc96c to your computer and use it in GitHub Desktop.
Install sudo in Termux (Android)
apt install git
git clone https://gitlab.com/st42/termux-sudo
cd termux-sudo
cat sudo > /data/data/com.termux/files/usr/bin/sudo
chmod 700 /data/data/com.termux/files/usr/bin/sudo
@omb7141980
Copy link

All you need to do after script for termux-sudo is make sure your in /data/data/com.termux/files/home/termux-sudo then "chmod +x sudo" then sudo is executable.

@androidlamine
Copy link

androidlamine commented Mar 31, 2023 via email

@Matthew-013
Copy link

pip install su try this command

@HURONREXX
Copy link

Si funciona

@Kinggras
Copy link

Sampai jumpa lagi kesalahan su executable tidak ditemukan sudo membutuhkan su Masalah saya terpecahkan? saya juga install sudo masalahnya sama dengan anda,cara pecahkannya gimana? mohon solusinya.

@Sadanandkumarraj
Copy link

All above command use but same result found sudo required su😞😞

@semorobhumi
Copy link

nothing for answer how to fix it, but always neded su. how to fix it without root?

@sachinkap
Copy link

?? some fundu guy please tell a way. i want to install an old version of python but no success without sudo

@a-usr
Copy link

a-usr commented May 21, 2023

nothing for answer how to fix it, but always neded su. how to fix it without root?

sudo is a command intended to execute a program with full access rights to virtually everything. The user that typically has this level of access on other Linux distributions is called "Root" or "Superuser". Android has a restriction in place to prevent that apps from accessing features that require that permission level. By rooting your device you basically remove that restriction partially.

So, to sum up, running a command / program using sudo gives it the permissions needed to access several restricted files and commands.
If your device isn't rooted, there is no possible way for a program / app to access / request these permissions, wich is why, ultimately, the sudo command in your terminal emulator (in this specific case termux) fails.

And one more thing: don't use sudo (or any other command) if you don't know what it is and what it does. Don't complain about rooting your device if you don't know how it changes your android device. And don't even touch a console emulator if you don't know shit about programming and operating systems. I know this sounds harsh, but if you don't know what your doing, you may permanently damage your device. (That's one reason why certain permissions are locked until you root your device)

@ackersh
Copy link

ackersh commented May 27, 2023

Downloading su-0.0.4-py3-none-any.whl (6.6 kB)
ERROR: Could not find a version that satisfies the requirement try (from versions: none)
ERROR: No matching distribution found for try

@CarterSnich
Copy link

pkg install tsu

tsu for running su
tsudo for running sudo

@mrkarthickdevil
Copy link

pkg install tsu

tsu for running su
tsudo for running sudo

This is only for Rooted devices work

@cruzheer
Copy link

cruzheer commented Sep 8, 2023

tsu & fakeroot are same is alternative. No need rooted device / su binary.

But this termux-sudo is for rooted devices.

You can read at this link, https://gitlab.com/st42/termux-sudo
It was shared from 5 years ago. Now is 2023 sir 😂

1000024284
1000024282

@cruzheer
Copy link

cruzheer commented Sep 8, 2023

But if you need sudo. This code can use at linux. You know, we can install distro linux in termux. You can select CLI only or with Desktop. If use Desktop, at android can use VNC (TigerVNC or TightVNC), if use kalifs / nethunter cli via Kex. This can , without root device.

But need more storage, if you install linux with desktop. Like kali linux if you install Kali ARM64 Full (1.9 GB) after installing is 11 GB. But defferent if cli only full or minimal or nano.

Sorry my bad english.

@cruzheer
Copy link

cruzheer commented Sep 8, 2023

For distro linux cli you can search at github or use Andronix app from play store.

For alternative, linux can run without termux use app Linux Deploy or UserLand. You can install from google play store.

This is 2023 please be smart like as your phone. Your phone is smart phone right.

sorry just kidding

@runng
Copy link

runng commented Sep 12, 2023

how to fix

su executable not found
sudo requires su

#_________________________

uninstall tsu package

pkg remove tsu

reinstall tsu package again

pkg install tsu

it working.✓ (tested on android 13)

@Drjacky
Copy link

Drjacky commented Nov 5, 2023

@omb7141980

All you need to do after script for termux-sudo is make sure your in /data/data/com.termux/files/home/termux-sudo then "chmod +x sudo" then sudo is executable.

Screenshot 2023-11-05 at 10 26 06

@marioestima
Copy link

Nothing happen

@cruzheer
Copy link

Nothing happen

read my comment, read text at screenshot

@babijavid
Copy link

image I tried all steps above on termux , installed tsu , No luck still same issue

@Nikhil-sys-gli
Copy link

Screenshot_20210225-023311

Balance commands

@Tyuol
Copy link

Tyuol commented Jan 17, 2024

mano
vejam ja internet como fazer root e o modelo do seu celular

@sukua77
Copy link

sukua77 commented Jan 31, 2024

~/termux-sudo $ su
No su program found on this device. Termux
does not supply tools for rooting, see e.g.
http://www.androidcentral.com/root for
information about rooting Android.
What ro do now

@DreamDevin
Copy link

pkg install sudo

how to fix

su executable not found sudo requires su

#_________________________

uninstall tsu package

pkg remove tsu

reinstall tsu package again

pkg install tsu

it working.✓ (tested on android 13)

Thanks it worked 😀😀

@DreamDevin
Copy link

pkg remove tsu
And
pkg install tsu
Then
sudo
It
Worked

@0Xkasr
Copy link

0Xkasr commented Apr 19, 2024

Update termux: apt-get update && apt-get upgrade -y
Install wget: apt-get install wget -y
Install proot: apt-get install proot -y
Install git: apt-get install git -y
Go to HOME folder: cd ~
Download script: git clone https://github.com/MFDGaming/ubuntu-in-termux.git
Go to script folder: cd ubuntu-in-termux
Give execution permission: chmod +x ubuntu.sh
Run the script: ./ubuntu.sh -y
Now just start ubuntu: ./startubuntu.sh

Apt update
Apt upgrade
Apt install sudo

@I-am-TURBO
Copy link

I-am-TURBO commented May 8, 2024

Update termux: apt-get update && apt-get upgrade -y Install wget: apt-get install wget -y Install proot: apt-get install proot -y Install git: apt-get install git -y Go to HOME folder: cd ~ Download script: git clone https://github.com/MFDGaming/ubuntu-in-termux.git Go to script folder: cd ubuntu-in-termux Give execution permission: chmod +x ubuntu.sh Run the script: ./ubuntu.sh -y Now just start ubuntu: ./startubuntu.sh

Apt update Apt upgrade Apt install sudo

hey!! this worked for me!!!

and now it's not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment