先前的文章有介紹如何在Windows WSL 內安裝Oh My Zsh 與Powerlevel10k,
還沒設定的請移步到Windows Terminal 搭配WSL
這裡會再延伸說明Oh My Zsh 下有什麼方便好用的工具
ZSH-Autosuggestions
1
| git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
- Add the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):
1 2 3 4
| plugins=( # other plugins... zsh-autosuggestions )
|
ZSH-Syntax-Highlighting
1
| git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
- Activate the plugin in ~/.zshrc:
1
| plugins=( [plugins...] zsh-syntax-highlighting)
|
ZSH-Completions
1
| git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
|
- Enable it in your .zshrc by adding it to your plugin list and reloading the completion:
1 2 3 4
| plugins=(… zsh-completions)
# 加入到~/.zshrc 的最後一行 autoload -U compinit && compinit
|
Homebrew for Linux
1 2 3 4 5 6 7 8 9 10 11
| sudo apt install -y curl
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.zshrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
sudo apt-get install build-essential
brew install gcc
|
其它工作需求工具
Git
1 2 3 4 5 6 7
| sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install git-core
git config --global user.name "$USER_NAME"
git config --global user.email "$USER_EMAIL"
|
Docker Engine
1 2 3
| curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh sudo usermod -aG docker $USER_NAME
|
Google Cloud SDK
1 2 3 4 5 6 7
| echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
sudo apt-get install apt-transport-https ca-certificates gnupg
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
sudo apt-get update && sudo apt-get install google-cloud-sdk
|
Kubectl
1
| sudo apt-get install kubectl
|
Kubectx
1 2 3 4 5
| sudo git clone https://github.com/ahmetb/kubectx /opt/kubectx
sudo ln -s /opt/kubectx/kubectx /usr/local/bin/kubectx
sudo ln -s /opt/kubectx/kubens /usr/local/bin/kubens
|
- 套用到
Oh-My-Zsh 的zsh-completions
1 2 3 4 5 6 7
| mkdir -p ~/.oh-my-zsh/completions
chmod -R 755 ~/.oh-my-zsh/completions
ln -s /opt/kubectx/completion/kubectx.zsh ~/.oh-my-zsh/completions/_kubectx.zsh
ln -s /opt/kubectx/completion/kubens.zsh ~/.oh-my-zsh/completions/_kubens.zsh
|
Nodejs
1 2 3 4
| # Using Ubuntu curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
|
1 2 3 4
| # Using Ubuntu curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
|
1 2 3 4
| # Using Ubuntu curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
|
1 2 3
| # Using Ubuntu curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - sudo apt-get install -y nodejs
|
Hexo
- 如果已經安裝好
Homebrew for Linux
K9S
- 如果已經安裝好
Homebrew for Linux