Edit

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 uses the same SQL Server Database Engine as SQL Server on Windows, providing a consistent feature set and management experience across supported platforms, including bare metal, virtual machines, and containers.

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 Service (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:

Operating system Container tags
Red Hat Enterprise Linux https://mcr.microsoft.com/artifact/mar/mssql/rhel/server/tags
Ubuntu https://mcr.microsoft.com/artifact/mar/mssql/server/tags

For RHEL-based SQL Server container images, see SQL Server Red Hat containers.

To learn more about containers, see SQL Server on Linux containers.

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.

Core capabilities

Because SQL Server on Linux shares the same database engine as Windows, most features behave identically across platforms. The following highlights summarize the principal capabilities, with Linux-specific notes where applicable.

Performance and query optimization

SQL Server on Linux supports mixed transactional and analytical workloads. Key technologies include:

  • In-memory OLTP for high-throughput transactional scenarios.
  • Columnstore indexes for efficient analytical queries on large datasets.
  • Query Store for monitoring query performance and managing execution plans.
  • Automatic tuning and intelligent query processing (IQP) to improve performance without application changes, including adaptive joins, memory grant feedback, parameter-sensitive plan optimization, and related enhancements.

These features are enabled through standard Transact-SQL configuration and database compatibility levels.

Security

SQL Server on Linux includes built-in security features to protect data at rest, in memory, and in transit:

  • Transparent data encryption (TDE)
  • Always Encrypted
  • Row-level security
  • Dynamic data masking
  • Auditing
  • Data discovery and classification
  • Vulnerability assessment

These capabilities help organizations meet compliance and data protection requirements without platform-specific differences.

Automation and maintenance

SQL Server Agent is available on Linux to run scheduled and automated tasks, including Transact-SQL (T-SQL) jobs, Database Mail, and log shipping. The agent is included in the SQL Server package and can be enabled by using the mssql-conf utility.

High availability and disaster recovery

SQL Server on Linux supports multiple availability and recovery options:

  • Always On availability groups and failover cluster instances, using Pacemaker or DH2i DxEnterprise
  • Log shipping for warm-standby scenarios

SQL Server can also run in containerized environments orchestrated by platforms such as Kubernetes, with optional integration of availability groups for higher resiliency.

Data integration and analytics

Additional capabilities available on Linux include:

  • PolyBase for querying and joining data across external data sources.
  • Machine Learning Services for running R and Python scripts close to the data.
  • Graph database features for modeling and querying relationship-based data.
  • Full-text search for linguistically aware text queries.
  • Integration Services (SSIS) package execution for ETL workloads. Package development and design is performed on Windows.

Some features, such as PolyBase, Machine Learning Services, and full-text search, require installing additional packages. For more information, see Installation guidance for SQL Server 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 2022 (16.x) Release notes SQL Server on Linux SQL Server on Windows
SQL Server 2019 (15.x) Release notes SQL Server on Linux SQL Server on Windows
SQL Server 2017 (14.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.