Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This guide helps you install Azure Linux on Windows Subsystem for Linux (WSL) and start using it as a local Linux environment for development, testing, and troubleshooting without needing a virtual machine (VM) or an Azure subscription.
Azure Linux on WSL uses the same command-line tools and behavior as Azure Linux running in Azure, so you can use it for day-to-day work and to reproduce issues locally.
Prerequisites
- Windows 10 (22H2) or Windows 11.
- WSL 2 installed and enabled. To install or enable, see How to install Linux on Windows with WSL.
- An internet connection.
- Permissions to install WSL distributions.
Install Azure Linux 4.0 on WSL
Open Windows Terminal (no admin required).
Follow the GitHub README guide to install Azure Linux.
Launch Azure Linux:
wsl -d AzureLinux-4
On first launch, you're prompted to create a Linux username and password. Use these credentials only inside the Azure Linux environment.
Verify the installation
After signing in, validate that Azure Linux is installed and running as expected.
cat /etc/os-release
You see output indicating Azure Linux and the installed version number.
At this point, Azure Linux is fully installed and ready to use.
Update packages (recommended)
After installation, update your system packages to ensure you have the latest fixes and security updates.
sudo dnf update -y
Use Visual Studio Code with Azure Linux (optional)
Note
Visual Studio Code isn't required, but you can use it with WSL for editing, debugging, and terminal workflows.
Install Visual Studio Code on Windows.
Install the Remote - WSL extension.
From an Azure Linux terminal, open a folder in VS Code.
code .
For more information, see the Visual Studio Code documentation.