Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xicor22/sudo-su-termux
Easy way to install sudo functionality in termux
https://github.com/xicor22/sudo-su-termux
shell sudo termux-tool tool
Last synced: 1 day ago
JSON representation
Easy way to install sudo functionality in termux
- Host: GitHub
- URL: https://github.com/xicor22/sudo-su-termux
- Owner: xicor22
- Created: 2020-06-12T13:34:59.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-13T18:12:57.000Z (over 4 years ago)
- Last Synced: 2023-12-03T16:21:33.765Z (about 1 year ago)
- Topics: shell, sudo, termux-tool, tool
- Language: Shell
- Homepage:
- Size: 17.6 KB
- Stars: 28
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sudo-su-Termux
A bash script to install the sudo functionality in termux.**Requirements**
The device must be rooted else this will not work.
**Installing sudo**
1. Open termux
2. Execute this command
```
wget https://raw.githubusercontent.com/xicor22/Sudo-su-Termux/master/install.sh >/dev/null 2>&1 && chmod +x install.sh && ./install.sh
```
3. Done!**Features**
- Sets up its environment automatically on first run, no need to do anything but use it
- Creates a root folder ```.suroot``` in the Termux home folder with proper root permissions and ownership
- Creates ```.bashrc``` file in root folder with proper PATH and LD_LIBRARY_PATH variables set so all binaries function correctly
- Bash prompt PS1 variable is also set so you don't have ```bash-4.4#``` as prompt just ```#```
- Automatically creates ```.bash_history``` in root folder when you drop to a root shell so root shell history is preserved
- Can be used like ordinary sudo (but only as root, no other user)
- Can drop to root shell ```sudo su [-]```
- Runs built in Termux binaries and exteral binaries with optional arguments as root in current directory
- Generates output in shell currently using
- Can be used in other bash scripts```
Usage:sudo su [-]
Drop to root shellsudo []
Run command as root with optional arguments
```**This was inspired by the following:**
https://gitlab.com/st42/termux-sudo