Skip to content

Instantly share code, notes, and snippets.

@kernkraft235
Created November 1, 2024 14:40
Show Gist options
  • Select an option

  • Save kernkraft235/cd28fe797b7c3fd89c90b5c6494529a3 to your computer and use it in GitHub Desktop.

Select an option

Save kernkraft235/cd28fe797b7c3fd89c90b5c6494529a3 to your computer and use it in GitHub Desktop.
Install WSL2.md

Official Documentation

Mega easy way that should work:

  1. Install Ubuntu from the Microsoft Store
  2. Once it's done installing open the Ubuntu app

A terminal window should pop up that has the following contents:

Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username:
  1. Choose a Username and type it in, then press enter

Tip

I recommend using the same schema as the mini-PC you may have to interact with Username: vpaz

  1. Enter password, (i just make up a 4 digit pin). On most Unix/Linux shells, you will NOT see the "password asterisks" as you type your password, it's still entering though

  2. You are now accessing the WSL2 Ubuntu shell - WSL2 is just a fancy Hyper-V VM that has tighter integration with your host Windows OS than a normal Hyper-V VM. As a result you also have Hyper-V installed so you can create full blown Windows/Linux/BSD VMs now using "Hyper-V Manager"

  3. Copy and paste this into your linux shell to quickly get your ubuntu updated and Quality of Life CLI apps installed

export WIN_USER=paz80570
sudo apt update && sudo apt install curl
curl https://gist.githubusercontent.com/kernkraft235/01158fd6dc27e59610f7b1d246167704/raw/a90f1e3c5b74af15e4bc770229ceea180710be14/ubuntu-bootstrap.sh | bash
curl
https://gist.githubusercontent.com/kernkraft235/01158fd6dc27e59610f7b1d246167704/raw/5c8234eb948abe905508bb90d9deceb5ab200b70/README.md -o ~/README.md

If for whatever reason the script fails, you can access it HERE

or the same page embedded below

https://gist.github.com/kernkraft235/01158fd6dc27e59610f7b1d246167704.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment