> For the complete documentation index, see [llms.txt](https://termux-wiki.zsxwz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://termux-wiki.zsxwz.com/root.md).

# root

安装root源：

```
apt install root-repo
```

安装sudo：

```
apt install tsu 

#进入tsu之后就可以使用安卓系统自带的命令了，刷了面具之后，就可以使用magisk命令
tsu
```

su

```
# 无需切换终端执行教本
su -c "脚本"

# 使用root-repo源的软件需要sudo运行，比如mtr
sudo mtr zsxwz.com
```

系统设置termux环境变量

```
su

export PATH=/data/data/com.termux/files/usr/bin:$PATH
```
