【Ubuntu基建】oh-my-zsh 安装

这系列文章主要是为了能够让每次应用新的Ubuntu电脑后能够快速装完所有必要的软件,具体的软件的介绍请自行百度。

1. zsh安装

安装oh-my-zsh需要先安装zsh。
首先确保没有安装zsh:

cat /etc/shells

如果没有安装的话,进行安装。

sudo apt-get install zsh 

2. oh-my-zsh安装

wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh

3. 安装插件

插件是oh-my-zsh的灵魂所在,我主要使用zsh-autosuggestionsautojump这两个插件。

cd ~/.oh-my-zsh/plugins && git clone https://github.com/zsh-users/zsh-autosuggestions.git && sudo apt install -y autojump

然后将~/.zshrcplugins行改为plugins=(git zsh-autosuggestions autojump)。注意中间间隔是空格或者table或者换行,不能是逗号。

4. 切换shell

chsh -s /bin/zsh

echo $0查看是否切换成功。
如果切换不了的话,就每次使用的时候输入一下zsh
然后,source ~/.zshrc && enjoy!

参考

https://github.com/ohmyzsh/ohmyzsh

你可能感兴趣的:(ubuntu,linux,运维)