cat /etc/shells
echo $SHELL
sudo apt install zsh
临时切换 :直接 /bin/zsh
设置默认shell: sudo chsh -s /bin/zsh 这里不是实时的,需要重启电脑后生效
注意:第一次切换zsh时会给一个选项(需要先安装oh-my-zsh再切换),选择2,zsh 会使用推荐的设置创建一个新的 ~/.zshrc 配置文件。如下图所示,此后您就可以正常使用 zsh Shell 了
这个是用来对zsh进行配置的
sh -c “$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)”
输入的命令中间有错的时候会自动显示红色
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh}/plugins/zsh-autosuggestions
sudo vim ~/.zshrc
然后将下面一句加入或在原有基础上进行修改到~/.zshrc中:
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
source ~/.zshrc
当前使用最习惯的是: essembeh ,不用单独获取,原来的里面就有
sudo vi ~/.zshrc
修改: ZSH_THEME=“essembeh”
source ~/.zshrc
如cuda,openvino,anaconda等:
#cuda
export PATH=$PATH:/usr/local/cuda/bin
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:{LD_LIBRARY_PATH:+:{LD_LIBRARY_PATH}}
#openvino
source /opt/intel/openvino/bin/setupvars.sh
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/fwq/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/fwq/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/fwq/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/fwq/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<