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- | sudo apt-key add -

Register the SQL Server 2022 on the Ubuntu repository

sudo add-apt-repository "$(wget -qO-"

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 I’d love to hear from you!

8,131 views3 comments

Recent Posts

See All


Siroga OOVII
Siroga OOVII
Aug 09, 2023

a few seconds ago

systemctl status mssql-server --no-pager × mssql-server.service - Microsoft SQL Server Database Engine Loaded: loaded (/lib/systemd/system/mssql-server.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2023-08-09 20:34:43 EEST; 55s ago Docs: Process: 1911406 ExecStart=/opt/mssql/bin/sqlservr (code=exited, status=127) Main PID: 1911406 (code=exited, status=127) CPU: 4ms Aug 09 20:34:43 systemd[1]: mssql-server.service: Sche… 4. Aug 09 20:34:43 systemd[1]: Stopped Microsoft SQL Serv…ne. Aug 09 20:34:43 systemd[1]: mssql-server.service: Star…ly. Aug 09 20:34:43 systemd[1]: mssql-server.service: Fail…e'. Aug 09 20:34:43 systemd[1]: Failed to start Microsoft …ne. Hint: Some lines were ellipsized, use -l to show in full. I don't know what to do, I have already reinstalled it several times, the server does not start and writes an error

issac ns
issac ns
Oct 17, 2023
Replying to

intstall the missing lib through the following link :


sql server standard is free in Ubuntu ? any automation script (Powershell maybe) for create VM Virtual Box, install and configure Ubuntu, and install and configure SQL Server 2022 ?

bottom of page