因為重裝了筆記本所以要重新配置開發環境。首要的是WSL2和Docker
WSL2
REF: Install WSL | Microsoft Learn
- Start Terminal (Powershell) as administrator
- Type
wsl --install
and wait for complete - Reboot
- If post-installation is required, perform it (e.g. .NET Framework 3.5)
- Create new UNIX acount
- Start Terminal (Powershell) and type
wsl -l -v
- Check
- Name = Ubuntu
- Version = 2
- Update to latest:
sudo apt update sudo apt upgrade
Note: If the update failure, it may be caused by the timezone issue. Try:
sudo su - hwclock -s # Check date time date
If it is not working, exist bash and start Powershell as administrator
wls --shutdown wls # Exit and start terminal / bash again and test the date
WSLg and Gnome Desktop
REF:
- 使用 WSL 运行 Linux GUI 应用 | Microsoft Learn
- Set up a GNOME desktop environment on WSL 2 · GitHub
- GitHub - microsoft/wslg: Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
Start Terminal (Ubuntu)
sudo apt update sudo apt install gimp -y sudo apt install nautilus -y ...
Docker Desktop
- Download Windows installer and install
- Reboot
- Start and test on Windows and WSL2