Linux
Linux
Install
.NET on Linux
Learn how to how to install .NET on various Linux distributions either manually, via a
package manager, or via a container. .NET is a free and open-source development
platform with languages, editors, and libraries to build for web, mobile, desktop, games,
and IoT.
Install
Visual Studio Code on Linux
VS Code is a lightweight source code editor with a rich ecosystem of extensions (C++,
C#, Java, Python, PHP, Go) and runtimes (such as .NET and Unity). Learn how to install
Visual Studio Code on Linux and keep it up to date via package managers. You can also
learn Remote development with Linux using VS Code and the WSL extension that lets
you use VS Code on Windows to build Linux applications.
Install
PowerShell on Linux
PowerShell is a cross-platform task automation solution made up of a command-line
shell, a scripting language, and a configuration management program. Learn how to
install PowerShell on Linux and find the currently supported Linux distributions and
package managers.
Install
Microsoft Edge on Linux
Microsoft Edge, built on the same technology as Chrome, now offers the Bing AI-
powered copilot, in addition to Startup boost, Efficiency mode, Microsoft Defender
SmartScreen, Password monitor, Collections, Vertical or Sleeping Tabs, and more. You
can install a Beta or Dev Channel version of Microsoft Edge on Linux via download or
using the command line.
Install
Microsoft Defender for Endpoint on Linux
Get a unified view of threats and alerts for your environment in the Microsoft 365
Defender portal empowering you to more quickly assess and respond to these threats.
Learn how to install, configure, update, and use Microsoft Defender for Endpoint on
Linux.
Azure
Linux container host for AKS
The Azure Linux Container Host is an operating system image that's optimized for
running container workloads on Azure Kubernetes Service (AKS). It's maintained by
Microsoft and based on Microsoft Azure Linux, an open-source Linux distribution
created by Microsoft. Learn more.
Install the
Azure CLI on Linux
The Azure Command-Line Interface (CLI) is a cross-platform command-line tool to
connect to Azure and execute administrative commands on Azure resources. It allows
the execution of commands through a terminal using interactive command-line prompts
or a script. Azure CLI list of commands.
Install
Azure PowerShell on Linux
Azure PowerShell is a collection of cross-platform modules that enable you to manage
all Azure resources. Its discoverable commands use Verb-Noun syntax, produce object-
oriented output, and offer powerful automation features.
Download
and install Azure Data Studio on Linux
Use Azure Data Studio to query, design, and manage your databases and data
warehouses wherever they are, on your local computer or in the cloud. You can install
Azure Data Studio on Red Hat Enterprise Linux (RHEL), SUSE Linux Enterprise Server
(SLES), Ubuntu, Debian, and Windows Subsystem for Linux (WSL).
New to Linux?
If you're new to Linux, we can help you to get started. Linux is an open source operating
system with many different versions due to the nature of being open source and fully
customizable. The different versions of Linux are called "distributions" (sometimes
shortened to “distros”). Check out our guide on How to download and install Linux that
covers how to:
If you want to learn more before you install Linux, check out some of our Linux-related
training available at Microsoft.
What is WSL?
Windows Subsystem for Linux (WSL) now supports running Linux GUI applications (X11
and Wayland) on Windows in a fully integrated desktop experience.
Install
Node.js on Linux with WSL
Node.js is an open-source, cross-platform, server-side JavaScript runtime environment,
often used for building fast, scalable web applications. Learn how to install Node.js on a
Linux distribution using WSL, nvm, and npm.
Install
React on Linux with WSL
React is an open-source JavaScript library for building front end user interfaces. Learn
how to install React on a Linux distribution using WSL, npx, and create-react-app.
Install
Python on Linux with WSL
Python is an interpreted, object-oriented, high-level programming language with
dynamic semantics. It is open-source and a popular option for web development using
Linux along with frameworks like Django and Flask. Learn how to install Python, Django,
and Flask using WSL, pip, and venv.
Linux on Azure
A learning path with training modules to help you deploy and manage Linux on Azure,
including cloud computing concepts, Linux IaaS and PaaS solutions, and Azure cloud
services.
Design a Performant Data Model in Azure SQL Database with Azure Data Studio
Learn how to create a data model with Azure data studio. Create indexes, tables and use
data types to help develop your applications.
Linux is an operating system, similar to Windows, but with many different versions due
to the nature of being open source and fully customizable. To install Linux, you must
choose an install method and choose a Linux distribution.
To install Linux:
1. Choose an install method: Windows Subsystem for Linux (WSL), Bare metal Linux;
or create a Virtual Machine (VM) to run Linux locally or in the cloud.
Use the install Linux command with Windows Subsystem for Linux (WSL)
Create a Linux Virtual Machine (VM) in the cloud
Create a Linux Virtual Machine (VM) on your local machine
Create a bootable USB to install bare-metal Linux
4. After installing Linux: Get familiar with your distribution's package manager,
update and upgrade the packages available, and get familiar with the other Linux
resources at Microsoft, such as training courses, Linux-versions of popular tools,
news, and Open Source events.
New to using Linux? We recommend starting with Windows Subsystem for Linux
(WSL) as it's the easiest way to get up and running.
Work in a business environment with more complex needs related to scale or
security? We recommend running Linux as a Virtual Machine (VM) in the cloud and
checking out the support that Azure has to offer. This also applies if you want to
run Linux as a server.
Only want to run Linux as your primary operating system? If you are good with a
slightly more complicated install process and don't need access to Windows tools
(like Outlook, Teams, Word, PowerPoint, etc), you can run Linux on bare metal to
access the full potential of your hardware without any overhead from virtualization
or emulation.
Learn more about these options below.
This method uses virtualization to integrate the Windows operating system (OS) with
the Linux OS (running on an actual Linux kernel). You can add as many different Linux
distributions as you please and run your favorite Linux tools, including GUI apps,
alongside your favorite Windows tools. You can also mix and match Bash and
PowerShell commands in the same command line. A Linux file system hosts your project
files, while a separate Windows file systems hosts any developer tools, such as VS Code,
that you'd like to work on the files with. This method of running Linux is highly efficient
and performant. Once you choose a Linux distribution or opt to use the default Ubuntu
distro, follow the instructions to Use the install Linux command with Windows
Subsystem for Linux or learn more in the WSL documentation.
Like with WSL, you can create VM instances of as many different Linux distributions as
you'd like, running them in an isolated environment, free from any conflicts and great
for software development testing. While running a Linux distribution on WSL has slightly
faster performance, a Linux VM is easier to clone or migrate. You can create a virtual
machine on a cloud service like Azure or on your local machine, using virtualization
software (otherwise known as a hypervisor).
Creating a VM on Azure means that it's hosted in the cloud, on Microsoft's servers. You
are essentially renting computing resources from Microsoft and using them to run the
VM. This can be convenient if you need to quickly provision a new VM or need to run a
workload that requires more computing resources than your local computer can
provide. Larger businesses with more complex needs often choose to run Linux VMs on
Azure for its scalability, control and abundance of features. Learn more about the
architecture, workflow, and considerations to Run a Linux VM on Azure.
You are responsible for managing the virtual machine when using a hypervisor,
including allocating resources like memory and disk space, and ensuring that it is secure
and up-to-date. This requires more technical expertise than some of the other options
and may not be as scalable or fault-tolerant.
Once you've chosen a distribution and decided whether you want to run the VM locally,
using a hypervisor, or in the cloud, using Azure, follow the instructions to Create a Linux
Virtual Machine in the Cloud or Create a Linux Virtual Machine locally using a Hypervisor
Bare metal Linux
Bare metal Linux just means that Linux is running directly on the device hardware. This
install method requires you to create a bootable USB drive by downloading an iso install
file from the site hosting your chosen Linux distribution. You will need to use a Windows
computer (or any desktop device with an existing OS) to create this drive.
Many users choose the traditional method of installing bare metal Linux on a device that
is also running Windows and using the "dual boot" method. To boot Linux and
Windows, you need to partition your hard drive to create separate spaces for both the
Linux and Windows OS. The performance speed between WSL, virtual machines, and
bare metal Linux has become so close that few developers choose this method due to
the overhead of needing to restart (reboot) your device any time you want to switch
between the operating systems. If you choose the bare metal Linux install route, you
may also need to deal with potential driver issues or hardware compatibility problems
that may arise with Linux on some devices.
You can find a list of Popular Linux Distributions available for download on Linux.org .
Once you've chosen a distro, follow the instructions to Create a bootable USB to install
bare-metal Linux.
2 Warning
If you are planning to dual boot or live boot a bare metal Linux distribution and
your Windows machine is using Bitlocker for encryption to protect data theft or
exposure, be certain to retrieve and store your BitLocker encryption keys prior
to installing Linux. Learn more in this Microsoft Q&A: Can I use Bitlocker with
Dual-Boot setup?
Community support
A large user community that consistently contributes to the distribution, fixing bugs,
adding features, helping with questions, etc. is another good consideration. Ubuntu is
one of the most popular distos. openSUSE has been around longer than most other
distributions and offers in addition to the stable version (Leap) a rolling version
(Tumbleweed). Many other distros rapidly grow popular as the needs and preferences of
the user community change. The Linux.org site has resources to help you assess what's
available, well-supported, or growing in popularity.
Step 3 - Follow install method instructions
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.
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.
Windows Hyper-V
VirtualBox
VMware
You will need to check the hardware requirements for your chosen hypervisor. Once the
hypervisor is enabled or installed, you will need to choose the type of OS that you want
to install and the installation source (this is typically a .iso or .vhdx file). You will need to
give the VM a name, select the directory where files will be hosted, select the amount of
memory to allocate to the VM and the size of the virtual hard drive where files will be
stored (you can typically choose between a fixed or dynamically allocated amount of
drive space). Sometimes integrations with a Linux virtual machine can be tricky due to
display drivers and other hardware dependencies, but most hypervisors have an active
user community that can help. You may also need to set up a virtual network if you want
your VM to connect to the internet.
If you're new to hypervisors and want to learn more, try the free online training module:
Configure and manage Hyper-V virtual machines.
1. Download an image file for your chosen Linux distribution. This is usually an ISO
file. As an example, you can find an image file for the most recent version of
Ubuntu at Download Ubuntu Desktop . Some Linux distributions may require you
to verify the image signature before downloading. Some Linux distributions also
cannot be installed unless Windows Secure Boot is disabled (which is not
recommended).
2. Create a bootable USB drive. You will typically need a USB drive with at least 16gb
of space. You will also need software to create the bootable drive. There are many
options (such as balenaEtcher, Rufus, UNetbootin, etc.). Often the download site
for your chosen Linux distribution will recommend which startup disk creater
software to use.
3. Boot your device from the USB drive. When restarting the device, you will need to
enter the boot menu. This is typically done by holding down the F12 key during
startup. You can then select the USB drive containing your Linux distribution ISO to
install from.
4. Select install options. Typically the installer for your Linux distribution will include a
set of installation steps that will involve choosing options about whether you want
to include certain features, third-party software packages, etc. You may also need
to specify whether to erase the disk in the case that this Linux distro will be the
only operating system, or to use a partition, if you plan to run multiple operating
systems. You may also be asked about whether you'd like to enable encryption.
5. Finally, as with any Linux installation, you will be asked to create a user name and
password.
1. Get familiar with the preferred package manager used by your chosen Linux
distribution. Linux uses package manager's to download and update any software
that you plan to use. For example, Ubuntu uses the Advanced Packaging Tool
(APT) .
2. Use your distribution's package manager to update and upgrade your distribution.
Software packages in a stable release of a Linux distribution are often outdated. It
is recommended to regularly run an update. You may also want to run an upgrade,
which installs newer versions of any packages that you've already installed. For
example, if you're using Ubuntu, run: sudo apt update && sudo apt upgrade .
3. Learn more about the Linux resources available at Microsoft, such as Linux-specific
versions of Microsoft tools like Visual Studio Code, .NET, and PowerShell, free
Linux-related training courses available from the Learn catalog, and information
about events, news, and the ongoing partnerships between Linux organizations
and Microsoft, including the Microsoft-supported Mariner distribution.
Windows Subsystem for Linux
Documentation
Article • 06/27/2022
Windows Subsystem for Linux (WSL) lets developers run a GNU/Linux environment --
including most command-line tools, utilities, and applications -- directly on Windows,
unmodified, without the overhead of a traditional virtual machine or dual-boot setup.
Install WSL
Learn more
What is the Windows Subsystem for Linux (WSL)?
What's new with WSL 2?
Comparing WSL 1 and WSL 2
Frequently Asked Questions
Get started
Install WSL
Install Linux on Windows Server
Manual install steps
Best practices for setting up a WSL development environment
Provide feedback
GitHub issue tracker: WSL
GitHub issue tracker: WSL documentation
Related videos
WSL BASICS
1. What is the Windows Subsystem for Linux (WSL)? | One Dev Question (0:40)
2. I'm a Windows developer. Why should I use WSL? | One Dev Question (0:58)
3. I'm a Linux developer. Why should I use WSL? | One Dev Question (1:04)
4. What is Linux? | One Dev Question (1:31)
5. What is a Linux distro? | One Dev Question (1:04)
6. How is WSL different than a virtual machine or dual booting? | One Dev
Question
7. Why was the Windows Subsystem for Linux created? | One Dev Question (1:14)
8. How do I access files on my computer in WSL? | One Dev Question (1:41)
9. How is WSL integrated with Windows? | One Dev Question (1:34)
10. How do I configure a WSL distro to launch in the home directory in Terminal? |
One Dev Question (0:47)
11. Can I use WSL for scripting? | One Dev Question (1:04)
12. Why would I want to use Linux tools on Windows? | One Dev Question (1:20)
13. In WSL, can I use distros other than the ones in the Microsoft Store? | One Dev
Question (1:03)
WSL DEMOS
1. WSL2: Code faster on the Windows Subsystem for Linux! | Tabs vs Spaces (13:42)
2. WSL: Run Linux GUI Apps | Tabs vs Spaces (17:16)
3. WSL 2: Connect USB devices | Tabs vs Spaces (10:08)
4. GPU Accelerated Machine Learning with WSL 2 | Tabs vs Spaces (16:28)
5. Visual Studio Code: Remote Dev with SSH, VMs, and WSL | Tabs vs Spaces (29:33)
6. Windows Dev Tool Updates: WSL, Terminal, Package Manager, and more | Tabs
vs Spaces (20:46)
7. Build Node.JS apps with WSL | Highlight (3:15)
8. New memory reclaim feature in WSL 2 | Demo (6:01)
9. Web development on Windows (in 2019) | Demo (10:39)
Latest features
h WHAT'S NEW
Azure Boost
Hibernation
Community Gallery
Linux quickstarts
f QUICKSTART
Azure CLI
Azure portal
Azure PowerShell
Terraform
Windows quickstarts
f QUICKSTART
Azure portal
Azure PowerShell
Terraform
Azure CLI
Self-paced training
d TRAINING
Troubleshooting
c HOW-TO GUIDE
Troubleshooting Guides
Microsoft Q&A
Resources
e OVERVIEW
Pricing
Regional availability
Linux versions of many Microsoft software products are supported and hosted on the
"Linux software repository for Microsoft products": https://packages.microsoft.com .
You can learn more about the PMC service (packages.microsoft.com), file issues or pull
requests, or report a security vulnerability on the affiliated GitHub repo: Microsoft Linux
Package Repositories .
7 Note
.NET on Linux
PowerShell on Linux
Microsoft Defender for Endpoint on Linux: (Manual deployment guide)
SQL Server on Linux: (Offline install guidance)
Microsoft InTune for Linux
) Important
Packages in the Linux Software Repository are subject to the license terms located
in each package. Please read the license terms prior to using the package. Your
installation and use of the package constitutes your acceptance of these terms. If
you do not agree with the license terms, do not use the package.
If you're unsure what distribution and version you are currently running, you can try
entering lsb_release -a (for any distro that includes the “lsb-release" package) or cat
/etc/os-release (for any distro that uses systemd).
To install the Microsoft product package you're after using this Linux repository
(packages.microsoft.com): sudo apt-get install <package-name>
In this example, entering cat /etc/os-release shows that Ubuntu, version 20.04, is
running. Visiting packages.microsoft.com , we can see Ubuntu 20.04 on the list. To
download the packages.microsoft.com repo, cURL is used to download with the
command: curl -sSL -O
https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb . The
repo config package is then installed with the command: sudo dpkg -i packages-
microsoft-prod.deb and then deleted as not to take up space. The list of packages is
then updated with the apt package manager using the command: sudo apt-get update .
To search what Microsoft packages are available after installing, change to the root
directory of your Linux distribution: cd / and look in the directory: /var/lib/apt/lists .
You will see a list of files with titles something like:
packages.microsoft.com_ubuntu_20.04_prod_dists_focal_main_binary-all_Packages . You
can open this file in a text editor (for example, nano <file-name> ) to see a list of the
available packages.
Red Hat-based Linux distributions
The Red Hat Package Manager (rpm) instructions assume that the package client
command is dnf but some rpm-based Linux distributions might be using other package
managers, such as tdnf .
microsoft-prod.rpm
To install the Microsoft product package you're after using this Linux repository
(packages.microsoft.com): sudo dnf install <package-name>
As an example of a pckage client that uses yum , the steps may be slightly different.
microsoft-prod.rpm
To install the Microsoft product package you're after using this Linux repository
(packages.microsoft.com): sudo yum install <package-name>
The path to each repo's metadata, such as the repomd.xml or Release/Packages for
Debian files. These metadata files are used by the client to determine which
packages are available for installation and what their dependencies are.
The paths to config files located under /config .
The paths to the key files located under /keys .
Report an issue : Help us improve the PMC service by reporting any issues you
are experiencing.
This article details how to install .NET on various Linux distributions either manually, via
a package manager, or via a container.
Manual installation
You can install .NET manually in the following ways:
Manual install
Scripted install
You may need to install .NET dependencies if you install .NET manually.
Packages
.NET is available in official package archives for various Linux distributions and
packages.microsoft.com .
Alpine
CentOS
Debian
Fedora
openSUSE
SLES
Ubuntu
.NET is supported by Microsoft when downloaded from a Microsoft source. Best effort
support is offered from Microsoft when downloaded from elsewhere. You can open
issues at dotnet/core if you run into problems.
Next steps
How to check if .NET is already installed.
Tutorial: Create a new app with Visual Studio Code.
Tutorial: Containerize a .NET app.
6 Collaborate with us on
GitHub .NET feedback
The .NET documentation is open
The source for this content can
source. Provide feedback here.
be found on GitHub, where you
can also create and review
Open a documentation issue
issues and pull requests. For
more information, see our
Provide product feedback
contributor guide.
Install PowerShell on Linux
Article • 09/05/2023
PowerShell can be installed on several different Linux distributions. Most Linux platforms
and distributions have a major release each year, and provide a package manager that's
used to install PowerShell. PowerShell can be installed on some distributions of Linux
that aren't supported by Microsoft. In those cases, you may find support from the
community for PowerShell on those platforms.
This article lists the supported Linux distributions and package managers. All PowerShell
releases remain supported until either the version of PowerShell or the version of the
Linux distribution reaches end-of-support.
Alpine
The following table lists the supported PowerShell releases and the versions of Alpine
they're supported on. These versions are supported until either the version of
PowerShell reaches end-of-support or the version of Alpine reaches end-of-life .
The icon indicates that the version of the OS or PowerShell is still supported
The icon indicates the version of PowerShell is no longer supported on that
version of the OS
The icon indicates that we haven't finished testing PowerShell on that OS
The icon indicates that the version of the OS or PowerShell isn't supported
When both the version of the OS and the version of PowerShell have a icon,
that combination is supported
3.15
3.14
Debian
Debian uses APT (Advanced Package Tool) as a package manager.
The following table is a list of currently supported PowerShell releases and the versions
of Debian they're supported on. These versions remain supported until either the
version of PowerShell reaches end-of-support or the version of Debian reaches end-of-
life .
The icon indicates that the version of the OS or PowerShell is still supported
The icon indicates the version of PowerShell is no longer supported on that
version of the OS
The icon indicates that we haven't finished testing PowerShell on that OS
The icon indicates that the version of the OS or PowerShell isn't supported
When both the version of the OS and the version of PowerShell have a icon,
that combination is supported
11
10
The icon indicates that the version of the OS or PowerShell is still supported
The icon indicates the version of PowerShell is no longer supported on that
version of the OS
The icon indicates that we haven't finished testing PowerShell on that OS
The icon indicates that the version of the OS or PowerShell isn't supported
When both the version of the OS and the version of PowerShell have a icon,
that combination is supported
Ubuntu
Ubuntu uses APT (Advanced Package Tool) as a package manager.
The following table is a list of currently supported PowerShell releases and the versions
of Ubuntu they're supported on. These versions remain supported until either the
version of PowerShell reaches end-of-support or the version of Ubuntu reaches end-of-
support .
The icon indicates that the version of the OS or PowerShell is still supported
The icon indicates the version of PowerShell is no longer supported on that
version of the OS
The icon indicates that we haven't finished testing PowerShell on that OS
The icon indicates that the version of the OS or PowerShell isn't supported
When both the version of the OS and the version of PowerShell have a icon,
that combination is supported
22.04 (LTS)
20.04 (LTS)
18.04 (LTS)
Only the LTS releases of Ubuntu are officially supported. Microsoft does not support
interim releases or their equivalent. Interim releases are community supported. For
more information, see Community supported distributions.
To be supported by Microsoft, the Linux distribution must meet the following criteria:
Linux.
6 Collaborate with us on
PowerShell feedback
GitHub
PowerShell is an open source
The source for this content can project. Select a link to provide
be found on GitHub, where you feedback:
can also create and review
issues and pull requests. For Open a documentation issue
more information, see our
contributor guide. Provide product feedback
Microsoft Azure Linux Container Host
for AKS
The Azure Linux Container Host for AKS provides reliability and consistency from cloud
to edge. Learn how to use the Azure Linux Container Host with these quickstarts,
tutorials, and how-to guides.
e OVERVIEW
p CONCEPT
Core concepts
Packages
f QUICKSTART
Azure CLI
ARM template
Terraform
g TUTORIAL
Troubleshooting
c HOW-TO GUIDE
Get help
i REFERENCE
Support
Release notes
FAQ