cd ~
mv .zsh_history .zsh_history_bad
strings -eS .zsh_history_bad > .zsh_history
fc -R .zsh_history
cd ~
mv .zsh_history .zsh_history_bad
strings -eS .zsh_history_bad > .zsh_history
fc -R .zsh_history
首先安装好 zsh
apt install -y zsh git
然后把 oh my zsh 克隆到本地,因为我的国内服务器访问不到github,所以要改一下地址,改成cnpm的加速镜像地址
git clone https://github.com.cnpmjs.org/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh