typora/note/工具集/linux+zsh.md
2024-12-12 10:48:55 +08:00

36 lines
981 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### 1.原码安装ZSH新版
> ubuntu 18.04 安装的zsh版本较低5.4oh-my-zsh需要使用5.8以上
1. 源码网址 https://zsh.sourceforge.io/Arc/source.html
2. `wget https://jaist.dl.sourceforge.net/project/zsh/zsh/5.8/zsh-5.8.tar.xz --no-check-certificate`
3. `tar xvf zsh-5.8.tar.xz`
4. centos 需要
```shell
yum install gcc perl-ExtUtils-MakeMaker
yum install ncurses-devel
```
5. `cd zsh-5.8`
6. `./configure`
7. `make && make install`
8. `vim /etc/shells` 添加 `/usr/local/bin/zsh`
### 2.安装ohmyzsh
1. `sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"`
### 3.安装插件
1. `git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions`
2. `git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting`
3. `zsh-syntax-highlighting zsh-autosuggestions`