Linux使用终端工具oh my zsh
【说明】
linux各个发行版都会有自己默认的bash,但是这些bash在界面展示、命令补齐方面或多或少都不太实用。推荐实用oh my zsh,配合插件实用效果更好。
一、安装
1、安装zsh
1 | apt install zsh -y |
2、配置zsh
1 | chsh -s /bin/zsh |
3、安装
1 | sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" |
或
1 | sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" |
二、配置
1、主题
编辑~/.zshrc
文件中ZSH_THEME
2、插件
启用插件
1 | plugins=(git z extract autojump zsh-syntax-highlighting zsh-autosuggestions rand-quote) |
需要额外安装的插件
zsh-syntax-highlighting
1 | git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting |
zsh-autosuggestions
1 | git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions |
cowsay
1 | sudo apt install cowsay |
cowsay搭配rand-quote使用,可以做出启动bash的欢迎界面,在~/.zshrc
最后添上quote | cowsay
三、附录
my .zshrc
1 | If you come from bash you might have to change your $PATH. |