WSL

WSL

Node.js on WSL

The apt-get version of node is incredibly old, and simplest way to install latest binary distributions:

curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
sudo apt-get install -y nodejs

Yarn Package Manager

curl -sL 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-get update && sudo apt-get install yarn

Reclaim WSL Disk Space

I occasionally have workloads that consume large amounts of disk space for temporary use. When I’m done with that workload, I have to:

wsl --shutdown
optimize-vhd -Path .\ext4.vhdx -Mode full

Better is to use “online” tool okibcn/wslcompact compacts the size of the WSL images by removing unused space. Try running wslcompact without parameters just for info on WSL images.

Bez instalacije bucketa, možeš da instaliraš samo tool:

scoop install https://raw.githubusercontent.com/okibcn/Bucket/master/bucket/wslcompact.json
date 14. May 2019 | modified 10. Jun 2024
filename: Windows » WSL