iTerm2 + oh my zsh 配置推荐

修改默认 shell(可选)

chsh -s /bin/zsh

安装 oh my zsh

# curl 方式
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

# wget方式
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
出现443 怎么办

修改 /etc/hosts 文件,添加:

199.232.68.133 raw.githubusercontent.com
151.101.185.194 github.global.ssl.fastly.net
140.82.113.4 github.com
151.101.184.133 assets-cdn.github.com
151.101.184.133 avatars0.githubusercontent.com
151.101.112.133 avatars1.githubusercontent.com

安装 JetBrains Mono 字体

  1. 下载链接
  2. 解压全选安装
  3. 修改 iTerm2 终端字体
    iTerm2 + oh my zsh 配置推荐_第1张图片

修改主题

vim .zshrc

ZSH_THEME这一行的主题改为agnoster

安装zsh插件

  1. 安装命令补全插件
cd ~/.oh-my-zsh/custom/plugins/
git clone https://github.com/zsh-users/zsh-autosuggestions
  1. 安装高亮插件
cd ~/.oh-my-zsh/custom/plugins/
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
  1. 添加插件
    在~/.zshrc 文件中更改插件
plugins=(
        git
        zsh-autosuggestions
        zsh-syntax-highlighting
)

enjoy it !!!

questions

  1. (anon):12: character not in range
    解决方法:
    .zshrc添加
export LC_ALL=C.UTF-8
export LANG=C.UTF-8

你可能感兴趣的:(linux)