- window 11
- 开启适用与 Linx 的 Windows 子系统
- 到微软商店下载 Ubuntu系统
- 这里我使用的是 WSL1,wsl --set-default-version <Version>
echo $SHELLcat /etc/shellssudo apt install zshchsh -s /bin/zshgit clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zshcp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrcGitHub
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10kGitee
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k在 ~/.zshrc 中添加
ZSH_THEME="powerlevel10k/powerlevel10k"使配置生效。
source ~/.zshrcp10k configure安装插件后要使用
source .zshrc使配置生效
- 
git 显示 git 的一些功能,默认已经安装 plugins=(git)
- 
z 跳转目录,直接在 plugins 里面添加 z plugins=( git z)
- 
sudo 偶尔输入某个命令,提示没有权限,需要加sudo,这个时候按两下ESC,就会在命令行头部加上 sudo 默认已经安装 plugins=( git sudo z)
- 
zsh-autosuggestions 会记录你之前输入过的所有命令,并且自动匹配你可能想要输入命令,然后按 Tab 补全 https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md#oh-my-zsh 克隆仓库 git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions添加配置 plugins=( git sudo z zsh-autosuggestions)
- 
zsh-syntax-highlighting 直接在输入过程中就会提示你,当前命令是否正确,错误红色,正确绿色 https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md#oh-my-zsh 克隆仓库 git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting添加配置 plugins=( git sudo z zsh-autosuggestions zsh-syntax-highlighting)
sudo apt install npmsudo npm i n -gsudo n lts也可以使用
npm直接安装,我这样安装是为了webstorm可以更好的找到路径
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn类似于
cnpm,个人感觉比cnpm好用
sudo npm i tyarn -gyarn config set -- --emoji true