-
to access home directory from windows explorer
\\wsl$ -
in ubuntu terminal first
cd ~which will bring me to home for ubuntu... thenexplorer.exe .which will open up windows explorer at home for ubuntu -
Nodemon and webpack-dev-server hot reload not working under WSL 2 after Windows 10 resinstall
I figured this out on my own. Just posting it here in case somebody encounters the same issue. The difference between my system now and before the re-installation is that I upgraded to WSL2. For some reason nodemon and webpack-dev-server hot reload does not work in WSL2. Downgrading to WSL 1 resolved the issue.
EDIT: In order for this to work in WSL 2, the project needs to be inside the linux file system. (I figured it out a long time ago, just forgot to post it here.)
-
Set Linux Distro Version to WSL 1 or WSL 2 in Windows 10
wsl -l -vwsl --set-version Ubuntu 2
To change wsl distro, run the following commands in Windows Powershell... pref as admin... not sure if it wld work otherwise...
-
check out the list of basic wsl commands
-
from the ref above, may want to update to latest version of WSL linux kernel
wsl --update -
prefer to also set default WSL version to 1
wsl --set-default-version <Version> -
unregister old version of distro
wsl --unregister <DistributionName>to uninstall. this shld wipe selected distro including all previously installed apps... i.e. shld be clean slate to start over... -
wsl --list --onlineto see a list of available distros and runwsl --install -d <DistroName>, in my casewsl --install -d Ubuntuto install a distro
-
follow instructions frm rocket to ensure Ubuntu has necessary updates/ installations...
sudo apt update,sudo apt upgrade,sudo apt install build-essential,sudo apt-get install ca-certificates -
lsb_release -ato chk version of Ubuntu installed -
to see what has been installed on Ubuntu, run
apt list --installed -
follow instructions here to install Node.js in Ubuntu together w nvm
-
to put bck alias to shorten command prompt path... see here on creating a .bash_aliases file to store aliases and here on the command for a shortened command prompt
-
to edit bash*aliases file in vscode, use
code ~/.bash_aliases,cd /mnt/c/Users/boon*/Desktop/rocketacademy/bootcampandPS1="\[\033[38;5;87m\]>\[$(tput sgr0)\]" -
reinstall postgresql with rocket instructions here note instructions disabled requirement for password to access databases
-
Run Multiple Instances of Same Linux Distro on WSL (Windows 10/11)
-
To install different distros on WSL, just
wsl --install -d <DistroName>, to switch between the distros, justwsl -d <DistroName>