Skip to content

Instantly share code, notes, and snippets.

@GabrielMMelo
Created January 22, 2019 12:33
Show Gist options
  • Select an option

  • Save GabrielMMelo/0e146f32d73978bf0d0a06786bcbc96c to your computer and use it in GitHub Desktop.

Select an option

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
@ishitasingh678
Copy link

su executable not found
sudo requires su

Pls help

@ishitasingh678
Copy link

su executable not found
sudo requires su

Pls help I did above all but still occurring this error

@armm29393
Copy link

pkg install sudo
It's worked!

@Luna1234julie
Copy link

Stiller on kt on m'y zfold 4 not rooted
Please help

@ilyaigpetrov
Copy link

ilyaigpetrov commented Oct 10, 2025

If you just need to execute sudo apt [...] then:

alias if-termux='[[ ! -z $TERMUX_VERSION]]' # If the var is not empty.
# Define `sudo` as no-op if inside Termux:
if-termux && alias sudo=''
# Update information about packages:
sudo apt update
# Upgrade all installed packages to the latest versions:
sudo apt upgrade
# Install Python programming language, version 3:
sudo apt install python3

@ahma78
Copy link

ahma78 commented Nov 22, 2025

Mihkhh

@ahma78
Copy link

ahma78 commented Nov 22, 2025

Oouu

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