下载安装
官网 & F-Droid & Github
扩展功能
1 2
| mkdir -p ~/.termux && echo "extra-keys = [['ESC','/','-','HOME','UP','END','PGUP','DEL'],['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN','BKSP']]" > ~/.termux/termux.properties termux-reload-settings
|
软件包管理
1 2 3 4 5 6 7 8 9 10
| pkg search <query> pkg install <package> pkg uninstall <package> pkg reinstall <package> pkg update pkg upgrade pkg list-all pkg list-installed pkg show <package> pkg files <package>
|
更换国内源
1 2 3 4 5 6
| echo "deb https://mirrors.ustc.edu.cn/termux/apt/termux-main stable main" > $PREFIX/etc/apt/sources.list echo "deb https://mirrors.tuna.tsinghua.edu.cn/termux/termux-packages-24 stable main" > $PREFIX/etc/apt/sources.list echo "deb https://mirrors.tuna.tsinghua.edu.cn/termux/science-packages-24 science stable" > $PREFIX/etc/apt/sources.list.d/science.list echo "deb https://mirrors.tuna.tsinghua.edu.cn/termux/game-packages-24 games stable" > $PREFIX/etc/apt/sources.list.d/game.list https://mirrors.tuna.tsinghua.edu.cn/termux/termux-root-packages-24/ pkg up
|
常用工具安装
1
| pkg i curl wget tree vim nano tmux htop
|
Oh My Zsh
安装配置
1 2 3 4
| pkg i zsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" sh -c "$(wget -O- https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" chsh -s zsh
|
修改主题
1 2
| sed -i '/^ZSH_THEME=/c\ZSH_THEME="ys"' ~/.zshrc source ~/.zshrc
|
安装插件
1 2 3 4 5 6 7 8 9 10 11 12
| pkg i -y git
git clone https://github.com/zsh-users/zsh-syntax-highlighting $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-completions $ZSH_CUSTOM/plugins/zsh-completions
[ -z "`grep "autoload -U compinit && compinit" ~/.zshrc`" ] && echo "autoload -U compinit && compinit" >> ~/.zshrc
sed -i '/^plugins=/c\plugins=(git z zsh-syntax-highlighting zsh-autosuggestions zsh-completions)' ~/.zshrc source ~/.zshrc
|
更多配置
修改问候语
1 2
| vi $PREFIX/etc/motd touch ~/.hushlogin
|
root 权限
1 2 3 4 5 6
| pkg i tsu
tsudo <command>
tsu
|
访问外部存储
1 2 3 4 5 6 7 8 9
| termux-setup-storage $ tree storage storage ├── dcim -> /storage/emulated/0/DCIM ├── downloads -> /storage/emulated/0/Download ├── movies -> /storage/emulated/0/Movies ├── music -> /storage/emulated/0/Music ├── pictures -> /storage/emulated/0/Pictures └── shared -> /storage/emulated/0
|
通过 /sdcard 来访问外部存储的根目录
SSH 连接
1 2
| pkg i openssh ssh User@Host -p Port
|
附录
Termux:Styling
https://blog.upx8.com/3587
https://blog.upx8.com/3588