My WSL 2 Setup, for Golang, Shell performance and memory limits

Have ubuntu Install GOlang in WSL2

sudo apt install ubuntu-release-upgrader-core

sudo do-release-upgrade -dc

sudo do-release-upgrade -d Don’t install GRUB

sudo apt install golang-go



appendWindowsPath = false


where code Alias code=/mnt/c/Users/anbossar/AppData/Local/Programs/Microsoft\ VS\ Code/bin/code alias code="/mnt/c/Users/anbossar/AppData/Local/Programs/Microsoft\ VS\ Code/bin/code" git clone


export GOPATH=$HOME/go export PATH=$GOPATH/bin:/home/andre/.local/bin/:$PATH Vi GNUmakefile fmtcheck: @sh “$(CURDIR)/scripts/” @sh “$(CURDIR)/scripts/” @bash “$(CURDIR)/scripts/”

Common myths: WSL2 is special, it’s not I need to so gopath, no, only when you deviate from the standard $HOME/go


wsl –shutdown




swap=0 localhostForwarding=true

alias drop_cache=“sudo sh -c “echo 3 >'/proc/sys/vm/drop_caches' && swapoff -a && swapon -a && printf ‘\n%s\n’ ‘Ram-cache and Swap Cleared’””

© 2020-10-16 07:19:25.677074616 +0000 UTC m=+0.031147947