How to instal wsl on windows 10

windows

Enviroment

Steps

  1. Run power shell with administrator.
  2. Execute command wsl --install. It will install Ubuntu automatically.
  3. Restart computer to apply. A ubuntu console pops up after you restart computer. It asks your new unix username and password. Type exit to leave the console.
  4. Search windows terminal on windows store. Get it.
  5. Open windows terminal and pin it to windows task bar. Now you have a shortcut.

Try GUI

  1. sudo apt install x11-apps -y
  2. Try command xcalc, xclock, xeyes

How to know my home directory

  1. cd ~
  2. explorer.exe .
  3. My home directory is \wsl.localhost\Ubuntu\home\adrian.

Reference