官网wiki:https://wiki.termux.com/wiki/ZSH
1. 安装
- 进入Termux后,输入下面的指令安装zsh
$ pkg install zsh
- 安装完成后通过下面指令进入zsh工具
现在的环境和以前区别不大,但是通过下面的配置文件配置后,会有即不一样的视觉感受
$ zsh
- 自动配置zsh
Termux 一共给出了两种自动配置zsh的方法,
- oh-my-zsh https://github.com/robbyrussell/oh-my-zsh
- oh-my-termux https://github.com/4679/oh-my-termux
废话不多说,开始一键配置.
- oh-my-zsh
# 通过curl下载
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# 通过weget下载
$ sh -c "$(wget -O- https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- oh-my-termux
$ bash -c "$(curl -fsSL https://git.io/oh-my-termux)"
- 安装后的效果
- 设置zsh默认的终端(需要重启终端)
$ chsh -s zsh
- 重启终端后检查是否为zsh shell
$ echo $SHELL
/data/data/com.termux/files/usr/bin/zsh