Skip to content

Instantly share code, notes, and snippets.

@sirius-beck
Created January 21, 2024 02:24
Show Gist options
  • Save sirius-beck/232bdd0cdb3e2110fe2bf8587148576e to your computer and use it in GitHub Desktop.
Save sirius-beck/232bdd0cdb3e2110fe2bf8587148576e to your computer and use it in GitHub Desktop.
Install yarn in WSL
#!/bin/bash
### Uncomment the line below to install Node.js if not already installed
# sudo apt-get install nodejs
### Install Yarn
sudo apt update
sudo apt install curl
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
### Uncomment the lines below to remove Windows yarn from PATH
# WIN_YARN_PATH="$(dirname "$(command -v yarn)")"
# export PATH="$(echo "${PATH}" | sed -e "s#${WIN_YARN_PATH}##")"
# Restart WSL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment