הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
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
- Run SQL Server in a Linux container
- Install SQL Server on Windows Subsystem for Linux (WSL 2) (for development only)
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:
- For both RHEL and Ubuntu based SQL Server container images, see SQL Server on the Microsoft Artifact Registry.
- For RHEL-based SQL Server container images, see SQL Server Red Hat 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:
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
- Ideas for SQL: Have suggestions for improving SQL Server?
- Microsoft Q & A (SQL Server)
- DBA Stack Exchange (tag sql-server): Ask SQL Server questions
- Stack Overflow (tag sql-server): Answers to SQL development questions
- Microsoft SQL Server License Terms and Information
- Support options for business users
- Additional SQL Server help and feedback
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.