Install MSSQL Server on Ubuntu

Currently, Microsoft has enabled us to install MSSQL Server on a Linux environment. In this tutorial, I will guide you all how to install it on Ubuntu!

Because the default Ubuntu repository does not have the MSSQL Server installation file, so to install the MSSQL server on Ubuntu, we need to add the MSSQL Server Ubuntu repository from Microsoft first.

First, you need to add the Microsoft certificate to your machine, using the following command:

then add the MSSQL Server Ubuntu repository:

Although as in the URL repository above, you can see: it is for Ubuntu version 16.04 but you can install MSSQL Server in higher versions of Ubuntu also. As my own, is using version 17.10 of Ubuntu.

After adding the MSSQL Server repository, you need to run the following command:

to update all the software available in your Ubuntu machine’s repository.

At this point, if you use the apt-cache command to search MSSQL Server will see the results as follows:

Install MSSQL Server on Ubuntu

Now you can start installing MSSQL Server:

Result:

Install MSSQL Server on Ubuntu

As you can see in the above window, we need to run the following command:

to complete the installation: select the version of MSSQL Server that you need to use and set the password for the account “sa”.

Select the MSSQL Server version:

Install MSSQL Server on Ubuntu

Here, I will enter 3 to install the Express version of MSSQL Server. You can choose according to your needs.

Install MSSQL Server on Ubuntu

Agree to terms of use: enter Yes then press Enter.

Install MSSQL Server on Ubuntu

The window above allows us to enter the password of the “sa” account. Please set the password and then confirm your own.

Finish:

Install MSSQL Server on Ubuntu

You can check the result by running the following command:

Result:

Install MSSQL Server on Ubuntu

Add Comment