MENU

Ubuntu20.04安装zsh

November 10, 2021 • linux相关

1. 准备

curl、wget、git

2. 安装 zsh

  • sudo apt install zsh -y

3. 安装 Oh My Zsh

  • sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  • sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

4. 切换成默认 shell

  • chsh -s /usr/bin/zsh

5. 修改主题

  • vim ~/.zshrc
  • ## 修改主题字段:
  • ZSH_THEME="amuse"

6. 安装字体

  • https://github.com/powerline/fonts

Rocky8.5 环境的坑

在这个发行版上执行不了 chsh -s /usr/bin/zsh 命令,找不到 chsh

  • sudo dnf install util-linux-user
Trevor did show that according to "dnf provides" the file "chsh" is in package "util-linux-user".
https://forums.centos.org/viewtopic.php?t=73864
Last Modified: March 31, 2022