- Enable WSL2 on Windows:
Open PowerShell as Administrator and run:wsl --install - Install your preferred Linux distribution (e.g., Ubuntu):
wsl --install -d Ubuntu
- Update the installed Linux distribution (inside WSL):
sudo apt update && sudo apt upgrade -y
- Install Terraform CLI:
sudo apt install -y wget unzip wget https://releases.hashicorp.com/terraform/$(curl -s https://releases.hashicorp.com/terraform/ | grep -oP '\d+\.\d+\.\d+' | head -1)/terraform_$(curl -s https://releases.hashicorp.com/terraform/ | grep -oP '\d+\.\d+\.\d+' | head -1)_linux_amd64.zip unzip terraform_*.zip sudo mv terraform /usr/local/bin/
- Install Bicep using Azure CLI:
First, install the Azure CLI:curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash az bicep install
- Install OpenTofu (an open-source alternative to Terraform):
curl -sSLf https://apt.opentofu.org/gpg | sudo gpg --dearmor -o /usr/share/keyrings/opentofu-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/opentofu-archive-keyring.gpg] https://apt.opentofu.org stable main" | sudo tee /etc/apt/sources.list.d/opentofu.list > /dev/null sudo apt update && sudo apt install -y opentofu
- Install Oh My Posh CLI in WSL:
sudo apt install -y wget wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 sudo mv posh-linux-amd64 /usr/local/bin/oh-my-posh sudo chmod +x /usr/local/bin/oh-my-posh
- Install a Nerd Font for glyph support:
mkdir -p ~/.local/share/fonts cd ~/.local/share/fonts wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.3.3/FiraCode.zip unzip FiraCode.zip fc-cache -fv
- Add Oh My Posh configuration to your shell:
echo 'eval "$(oh-my-posh init bash)"' >> ~/.bashrc
- Install essential utilities and tools:
sudo apt install -y build-essential git curl wget unzip
- Install Python and pip:
sudo apt install -y python3 python3-pip
- Install Azure SDKs for Python:
pip3 install azure-storage-blob azure-mgmt-resource azure-ai-formrecognizer
- Already installed earlier. Use it to manage Azure resources:
az login
- Open Settings > Apps to uninstall unnecessary applications.
- Disable ads:
- Settings > Personalization > Start: Turn off “Show suggestions.”
- Settings > Privacy > General: Disable ad-related options.
- Run this command from WSL:
powershell.exe "Get-AppxPackage -AllUsers | Remove-AppxPackage"
- Use the Win11Debloat script:
Inside WSL, download and execute it:wget https://raw.githubusercontent.com/Raphire/Win11Debloat/main/Win11Debloat.ps1 powershell.exe -File ./Win11Debloat.ps1
- Automate the setup in WSL with this script:
# Update and install tools sudo apt update && sudo apt upgrade -y sudo apt install -y wget unzip git python3 python3-pip curl build-essential # Install Terraform wget https://releases.hashicorp.com/terraform/$(curl -s https://releases.hashicorp.com/terraform/ | grep -oP '\d+\.\d+\.\d+' | head -1)/terraform_$(curl -s https://releases.hashicorp.com/terraform/ | grep -oP '\d+\.\d+\.\d+' | head -1)_linux_amd64.zip unzip terraform_*.zip sudo mv terraform /usr/local/bin/ # Install OpenTofu curl -sSLf https://apt.opentofu.org/gpg | sudo gpg --dearmor -o /usr/share/keyrings/opentofu-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/opentofu-archive-keyring.gpg] https://apt.opentofu.org stable main" | sudo tee /etc/apt/sources.list.d/opentofu.list > /dev/null sudo apt update && sudo apt install -y opentofu # Install Azure CLI and Bicep curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash az bicep install # Install Oh My Posh wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 sudo mv posh-linux-amd64 /usr/local/bin/oh-my-posh sudo chmod +x /usr/local/bin/oh-my-posh echo 'eval "$(oh-my-posh init bash)"' >> ~/.bashrc # Install Python Azure SDKs pip3 install azure-storage-blob azure-mgmt-resource azure-ai-formrecognizer
This version uses icons and formatting to make the document easier to read and visually engaging. Let me know if you need further adjustments! 🚀