To
install Linux on a Windows PC, use the install Linux command.
1. Open PowerShell or Windows Command Prompt in
administrator mode
by right-
clicking and selecting "Run as administrator".
2. Enter the Linux install command:
wsl --install
.
3. Restart your machine.
Step 3 - Follow install method instructions
Install Linux with Windows Subsystem for Linux
By default, the install command will use the Ubuntu distribution of Linux. You can see
the other distributions that are available in the Microsoft Store by entering the
command:
wsl -l -o
. If you'd like to install a
distribution other than Ubuntu, just add
-
d
to the command with the name of the distribution you'd like to install:
PowerShell
If the distribution you want to install isn't available in the Microsoft Store, see the
Windows Subsystem for Linux (WSL) documentation on how to
Import
any Linux
distribution to use with WSL
.
For more information on how to use VS Code, Git, databases, Docker, GUI apps, GPU
acceleration, NodesJS,
USB devices, or mount a disk, build a custom distribution,
manage disk space, or set up WSL for your enterprise business, see the
WSL
documentation
.
To create a Linux Virtual Machine (VM) that is
hosted in the cloud on Azure, log-in to the
Azure Portal and select the “Create a Virtual Machine” service. Then follow the
Install Linux command options
wsl
--install -d
Create a Linux Virtual Machine in the cloud
instructions for creating a user name, project, instance, SSH key, ports,
and copying the
IP address.
Azure supports a variety of options for setting up Linux VMs in the cloud. For a
quickstart guide on how to set up a Linux VM, choose your preferred method:
Azure Portal
Azure CLI
Azure PowerShell
Terraform
A Bicep file
Azure Resource Manager (ARM)
template
If you don't have an Azure subscription,
create a free account
before you begin. If
you're new to creating Linux VMs with Azure, you can
learn more about VMs
or check
out the online training course:
Create a Linux
virtual machine in Azure
.
To create a Linux VM that is hosted on your local machine using a hypervisor, you can
use:
Windows Hyper-V
VirtualBox
VMware