Switch to WSL in Windows Terminal for Azure CLI

✅ Fastest Way (Recommended)

1️⃣ Open Windows Terminal

  • Press Win + XWindows Terminal
    (or search “Windows Terminal”)

2️⃣ Open WSL

In Windows Terminal, either:

  • Click the ▼ dropdown at the top
  • Select Ubuntu (or your Linux distro)

👉 You are now inside WSL 🎉
Prompt will look like:

username@PC-name:~$

✅ Command-line Way (works everywhere)

From PowerShell or Command Prompt:

wsl

Or explicitly:

wsl -d Ubuntu

🔍 Check which distros are installed

If you’re not sure what you installed:

wsl --list --verbose

You’ll see something like:

NAME      STATE     VERSION
Ubuntu   Running   2

🧰 First-time setup inside WSL (important)

Once inside Ubuntu:

Update packages

sudo apt update && sudo apt upgrade -y

Install Azure CLI

curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

Verify:

az --version

Install AzCopy (recommended for your work)

sudo apt install azcopy -y

Verify:

azcopy --version

📁 Access your Windows files from WSL

Your Windows drives are mounted under /mnt:

WindowsWSL Path
C:\/mnt/c
Downloads/mnt/c/Users/<you>/Downloads

Example:

cd /mnt/c/Users/<your-username>
ls

🔐 Log in to Azure (inside WSL)

az login

This opens a browser on Windows and authenticates WSL too.


🧪 Quick sanity test (Azure + Blob)

az account show
az storage account list -o table

🎯 Why WSL is perfect for your ACA + azcopy work

  • Same shell behavior as Linux containers
  • No PowerShell quoting issues (&, ?, \)
  • AzCopy behaves exactly like in ACA
  • Ideal for debugging SAS and scripts locally

🧠 Pro Tip (optional but nice)

Set Ubuntu as the default profile in Windows Terminal:

  • Windows Terminal → Settings → Default profile → Ubuntu
FavoriteLoadingAdd to favorites

RECENT POSTS


Categories



Tags

ADO ai angular asian asp.net asp.net core azure ACA azure administration Azure Cloud Architect Azure Key Vault Azure Storage Blazor WebAssembly BLOB bootstrap c# containers css datatables design pattern docker excel framework Git HTML JavaScript jQuery json knockout lab LINQ linux power bi powershell REST API smart home SQL Agent SQL server SSIS SSL SVG Icon typescript visual studio Web API window os wordpress


ARCHIVE


DISCLAIMER