Install SQL Server 2022 on Ubuntu in 5 minutes
top of page

Install SQL Server 2022 on Ubuntu in 5 minutes

Having trouble installing SQL Server 2022 on Ubuntu? Follow our 5-minute guide and get SQL Server up and running on your Ubuntu machine in no time! We'll walk through the installation process, so you can get started using SQL Server right away.


Are you excited about the new SQL Server 2022? Yes, it's time to install it and explore its different features and enhancements.



In this article, we install SQL Server 2022 on the Ubuntu 20.0 virtual machine. If you do not have a test server, you can download Oracle VM VirtualBox and install Ubuntu on it. Please let me know in the comments if you need any assistance.


Let's start your Ubuntu VM and launch the terminal. Follow the steps mentioned below for SQL Server 2022 installation and configuration.


Import the public repository GPG security key:

$ wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

Register the SQL Server 2022 on the Ubuntu repository

sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-preview.list)"

Use an apt-get utility to update the Ubuntu repositories.

sudo apt-get update


Download and install SQL Server 2022: This step may take time as it will install dependencies packages such as gawk, libatomicl , libc++1. It will also download SQL Server 2022 setup from the Microsoft registry and start the installation process.


Note: We do not have GUI mode for SQL Server on Linux.

sudo apt-get install -y mssql-server




SQL installation completes and asks you to run the mssql-conf utility for configuration. This mssql-conf utility requires specific user inputs.

sudo /opt/mssql/bin/mssql-conf setup

The following inputs are required:

  • SQL Server edition: Enter the serial number of the SQL Server 2022 edition that we wish to use. For this demo, I will go with the first option, Evaluation.

  1. Evaluation

  2. Developer

  3. Express

  4. Web

  5. Standard

  6. Enterprise

  7. Enterprise Core

  8. BYOB ( Bring your license)


Accept SQL Server License terms, and Choose the SQL Server Language. I enter value 1 for English installation. We also need to specify the sysadmin (SA) password for configuring SQL Server, as shown below.


Since we chose the Evaluation edition, the installer gives a message that there are 107 days left in the expiry of the evaluation period.



Once SQL Server 2022 is installed, you get the message – Setup has completed successfully. SQL Server is now starting, and it is advisable to check the service status.

systemctl status mssql-server --no-pager

The output should show the service status as active(running), process id( PID), Memory, and default bin directory.




For connecting to SQL Server 2022 Linux, we require command-line tools such as SQLCMD or Azure Data Studio, SQL Server Management Studio. If you want to connect remotely from a Windows machine, you can install SSMS from the link.


SSMS is a windows based application. Therefore, you can choose Azure Data Studio for installation in the Linux machine itself. You can refer to the guide for setting up Azure Data Studio in Linux.


Once installed, launch Azure Data Studio and create a new connection for SQL Server 2022.



The Azure Data Studio dashboard shows the version as 16.0.600.9, i.e., Microsoft SQL Server 2022 Community Technology Public Preview 2.0 (CTP 2.0).


You can verify that SQL Server 2022 has a new compatibility level, 160.



I’m really excited to be writing blog posts such as this that showcase the different features and capabilities of SQL Server 2022. I’m sure that the further I get into my series, the more I’ll learn about all of the new features in this exciting release! If you have any comments or questions about the SQL Server 2022 release, don’t hesitate to contact me at rajendra.gupta16@gmail.com. I’d love to hear from you!



8,160 views5 comments

Recent Posts

See All
bottom of page