Termux编辑软件源



编辑apt源配置文件sources.list

vi /data/data/com.termux/files/usr/etc/apt/sources.list

  • 科大源

使用 sed 命令进行文本替换:

sed -i 's,https://termux.net,https://mirrors.ustc.edu.cn/termux,' $PREFIX/etc/apt/sources.list
  • 清华源
sed -i '[email protected]^\(deb.*stable main\)[email protected]#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/termux-packages-24 stable [email protected]' $PREFIX/etc/apt/sources.list
sed -i '[email protected]^\(deb.*games stable\)[email protected]#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/game-packages-24 games [email protected]' $PREFIX/etc/apt/sources.list.d/game.list
sed -i '[email protected]^\(deb.*science stable\)[email protected]#\1\ndeb https://mirrors.tuna.tsinghua.edu.cn/termux/science-packages-24 science [email protected]' $PREFIX/etc/apt/sources.list.d/science.list

更新

apt update&&apt upgrade -y

Termux软件管理可参考Termux软件管理

comments powered by Disqus