แก้ไข

แชร์ผ่าน


What is SQL Server on Linux?

Applies to: SQL Server on Linux

SQL Server runs on Linux, starting with SQL Server 2017 (14.x). It's the same SQL Server Database Engine with many similar features and services across supported operating systems.

Get started

If you're familiar with SQL Server and unfamiliar with Linux, see New to Linux resources for SQL users.

If you're familiar with Linux and unfamiliar with SQL Server, see New to SQL Server: Learning resources.

Choose your installation

The following sections help you install SQL Server on Linux in your preferred environment.

Install SQL Server directly on a Linux machine or VM

The following quickstart articles describe how to install SQL Server on Linux on physical hardware or a virtual machine (VM) and create a database:

Platform SQL Server version supported
Red Hat Enterprise Linux (RHEL) 2017, 2019, 2022, and 2025
Ubuntu 2017, 2019, 2022, and 2025
SUSE Linux Enterprise Server (SLES) 1 2017, 2019, and 2022 only
SQL Server on Azure Virtual Machines 2017, 2019, 2022, and 2025

1 SUSE Linux Enterprise Server (SLES) isn't supported on SQL Server 2025 (17.x) and later versions.

Run SQL Server in a Linux container

Containers are useful in local testing, continuous integration and deployment (CI/CD), and ephemeral workloads in your development environment. They're also commonly used as part of container orchestration in production environments, including Azure Kubernetes Services (AKS), Red Hat OpenShift, and DH2i DxOperator.

For instructions on how to install SQL Server in a Linux container, see Quickstart: Run SQL Server Linux container images with Docker.

The SQL Server container images are published and available on the Microsoft Container Registry (MCR). They're also cataloged at the following locations, based on the operating system image that was used when creating the container image:

Note

Containers are only published to MCR for the most recent Linux distributions. If you create your own custom SQL Server container image for an older supported distribution, it's still supported. For more information, see Upcoming updates to SQL Server container images on Microsoft Artifact Registry (MCR).

Install SQL Server on Windows Subsystem for Linux (WSL 2)

SQL Server on WSL 2 is intended for development purposes only, and is not supported for production workloads. Run SQL Server in WSL environments on one of the supported platforms for the version of SQL Server you intend to run.

For instructions on how to install SQL Server on WSL 2, see Windows Subsystem for Linux (WSL 2).

Connect

After installation, connect to the SQL Server instance on your Linux machine. You can connect locally or remotely and with various tools and drivers. The quickstarts demonstrate how to use the sqlcmd command-line tool. Other tools include:

Tool Tutorial
sqlcmd utility Connect to SQL Server with sqlcmd
MSSQL extension for Visual Studio Code Connect to and query a database with the MSSQL extension for Visual Studio Code
SQL Server Management Studio (SSMS) Use SQL Server Management Studio on Windows to manage SQL Server on Linux
SQL Server Data Tools (SSDT) Use Visual Studio to create databases for SQL Server on Linux

Explore

SQL Server 2017 (14.x) and later versions have the same underlying Database Engine on all supported platforms, including Linux and containers. Therefore, many existing features and capabilities operate the same way. This area of the documentation highlights some of these features from a Linux perspective and calls out areas that have unique requirements on Linux.

If you're already familiar with SQL Server on Linux, review the release notes for general guidelines and known issues for each release.

SQL Server version Release notes (Linux) What's new (Linux) What's new (Windows)
SQL Server 2025 (17.x) Release notes SQL Server on Linux SQL Server on Windows
SQL Server 2025 (17.x) Release notes SQL Server on Linux SQL Server on Windows
SQL Server 2025 (17.x) Release notes SQL Server on Linux SQL Server on Windows
SQL Server 2025 (17.x) Release notes SQL Server on Linux SQL Server on Windows

Tip

For answers to frequently asked questions, see the SQL Server on Linux FAQ.

Get help

Contribute to SQL documentation

Did you know that you can edit SQL content yourself? If you do so, not only do you help improve our documentation, but you also get credited as a contributor to the page.

For more information, see Edit Microsoft Learn documentation.