WSL Workarounds
Various tricks and workarounds for WSL (Windows Subsystem for Linux).
Table of content
Workarounds
WSL says it is not installed on first launch
This is an issue related to the window service called lxssmanager and is resolved by restarting it.
Run lxssmanager-restart.bat
as administrator.
Tips: Create a shortcut to lxssmanager-restart.bat
- Right-click lxssmanager-restart.bat > Send to > Desktop (move it anywhere you like later).
- Right-click lxssmanager-restart shortcut (Desktop) > Properties.
- Click Advanced... button.
- Check Run as administrator.
- Click OK.
- Select the Shortcut key field. (optional)
- Assign the desired shortcut. (optional)
- Click OK.
Issues with npm install
This is usually a issue related to the mounting of Windows C:\ drive to /mnt/c path. This can be resolved by appending a script to .bashrc (ran on every bash session) to re-mount the C:\ drive when needed.
Install
- Open Bash on Windows.
- Run:
cd /path/to/wsl-workarounds
- Run:
bash wsl-mount-fix.sh --install
Uninstall
- Run:
bash wsl-mount-fix.sh --uninstall