zsh for linux

安装zsh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
yum install -y zsh git

# 这里要自己配代理, 没有代理想办法换个gitee仓库, 包括下面的git代理也是一样的
wget -e "https_proxy=http://192.168.174.85:7890/" -O - https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh

which zsh

chsh -s /usr/bin/zsh

# git配置代理
git config --global http.proxy http://192.168.174.85:7890
git config --global https.proxy https://192.168.174.85:7890

git clone https://github.com/powerline/fonts.git

cd fonts

./install.sh

# 设置主题
vim /root/.zshrc
ZSH_THEME="random"

安装第三方插件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 如果报错, 多尝试几次
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
# 正克隆到 'zsh-syntax-highlighting'...
# error: RPC failed; result=35, HTTP code = 0
# fatal: The remote end hung up unexpectedly

cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
git clone https://github.com/zsh-users/zsh-autosuggestions.git



vim ~/.zshrc
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)

zsh
source /root/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /root/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source $ZSH/oh-my-zsh.sh

source ~/.zshrc

# 升级zsh 可忽略
omz update

参考:


zsh for linux
https://xiamu.icu/Linux/zsh for linux/
作者
肉豆蔻吖
发布于
2024年1月3日
许可协议