How to instal wsl on windows 10
Enviroment
- Open cmd to view windows version.
- Or execute command
veron console. - My windows version is 10.0.19045.2364. If you want to use Linux GUI you need on Windows 10 Build 19044+ or Windows 11.
Steps
- Run power shell with administrator.
- Execute command
wsl --install. It will install Ubuntu automatically. - Restart computer to apply. A ubuntu console pops up after you restart computer. It asks your new unix username and password. Type
exitto leave the console. - Search windows terminal on windows store. Get it.
- Open windows terminal and pin it to windows task bar. Now you have a shortcut.
Try GUI
sudo apt install x11-apps -y- Try command
xcalc,xclock,xeyes
How to know my home directory
cd ~explorer.exe .- My home directory is \wsl.localhost\Ubuntu\home\adrian.
Reference
- https://learn.microsoft.com/en-us/windows/wsl/install
- https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps