zsh 安装与配置:9步打造高效命令行 - 知乎 (zhihu.com)
安装、配置zsh
安装
sudo apt install zsh
查看版本
zsh --version
查看shell
echo $SHELL
或
grep 用户名 /etc/passwd
切换shell
usermod -s $(which zsh) 用户名
usermod -s shell 用户账号 修改用户登录后所使用的shell
Linux usermod命令 | 菜鸟教程 (runoob.com)
或
sudio chsh -s $(which zsh) 用户名
或
chsh
/bin/zsh
(root用户应该是改不了)
重启reboot
ctrl+alt+t 打开terminal
选0
sudo gedit ~/.zshrc
添加
HISTSIZE = 1000
SAVEHIST = 1000
HISTFILE = ~/.zsh_history
在命令行输入(oh my Zsh)(缺少软件就安装)
sh -c "$(curl -fsSLhttps://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"```
或
```
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"