In windows command prompt,
cd ~
notepad .wslconfig
[wsl2] memory=16GB swap=64GB swapFile=D:\\swap.vhdx
Then, type
wsl --shutdown
In WSL,
sudo vi /etc/wsl.conf
[interop]appendWindowsPath = false
wsl --shutdown to restart the Linux
echo $PATH
to verify the path is correct