sohotcall

Windows Subsystem for Linux 2

Jun 21st, 2020 (edited)
93
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Jalankan di Windows PowerShell sebagai Administrator
  2.  
  3. // Cek Windows 10 64 bit sudah diupdate minimum Microsoft Windows version 2004
  4. winver
  5.  
  6. // Install WSL
  7. dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  8.  
  9. // Install Virtual Machine Platform
  10. // Pastikan Virtualization sudah di-Enable di PC BIOS Setting
  11. dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  12.  
  13. // Restart
  14.  
  15. // Download dan Install Kernel Update
  16. // Bila tidak bisa install, uninstall dulu ( klik kanan -> uninstall )
  17. https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
  18.  
  19. // Aktifkan WSL versi 2
  20. wsl --set-default-version 2
  21.  
  22. // Download distro
  23. // https://aka.ms/wslubuntu2004
  24. // https://aka.ms/wsl-ubuntu-1804
  25. // https://aka.ms/wsl-ubuntu-1604
  26. // https://aka.ms/wsl-debian-gnulinux
  27. // https://aka.ms/wsl-kali-linux-new
  28. // https://aka.ms/wsl-opensuse-42
  29. // https://aka.ms/wsl-sles-12
  30. // https://github.com/WhitewaterFoundry/WSLFedoraRemix/releases/
  31. Invoke-WebRequest -Uri https://aka.ms/wsl-debian-gnulinux -OutFile wsl-debian-gnulinux.appx -UseBasicParsing
  32.  
  33. // Install distro
  34. Add-AppxPackage .\wsl-debian-gnulinux.appx
  35.  
  36. // Jalankan distro dari start menu
  37.  
  38. // Lihat daftar distro terinstall
  39. wsl -l -v
  40.  
  41. // Ganti distro ke versi 1 atau versi 2
  42. wsl --set-version Debian 1
  43.  
  44. /// Nggak bisa internet
  45. $ sudo nano /etc/resolv.conf
  46. change nameserver 172.24.0.1 to nameserver 8.8.8.8
  47.  
  48. $ sudo nano /etc/wsl.conf
  49. [network]
  50. generateResolvConf = false
RAW Paste Data