• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / Ubuntu / How To Install Microsoft SQL Server On Linux Ubuntu

How To Install Microsoft SQL Server On Linux Ubuntu

By Sourabh / November 21, 2016 Category: How To, Ubuntu

How to install Microsoft SQL Server on Linux Ubuntu Systems. Terminal commands to install SQL Server vNext CTP1 on Ubuntu 16.04 Systems.

Install SQL Server on Ubuntu

To install the mssql-server Package on Ubuntu, follow these steps:

Import the public repository GPG keys:

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

Register the Microsoft SQL Server Ubuntu repository:

curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | sudo tee /etc/apt/sources.list.d/mssql-server.list

Run the following commands to install SQL Server:

sudo apt-get update
sudo apt-get install -y mssql-server

After the package installation finishes, run the configuration script and follow the prompts.

sudo /opt/mssql/bin/sqlservr-setup

Once the configuration is done, verify that the service is running:

systemctl status mssql-server

Install tools on Ubuntu

Import the public repository GPG keys:

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

Register the Microsoft Ubuntu repository:

curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list

Update the sources list and run the installation command:

sudo apt-get update
sudo apt-get install mssql-tools

Connect to SQL Server on Linux

After installation, connect to the SQL Server instance to create and manage databases. Ubuntu users can connect and query SQL Server on Linux with sqlcmd. Sqlcmd is part of the SQL Server command-line tools.

Run sqlcmd with parameters for your SQL Server name (-S), the user name (-U), and the password (-P). The following command connects to the local SQL Server instance (localhost) on Linux.

sqlcmd -S localhost -U SA -P ''

To connect to a remote instance, specify the machine name or IP address for the -S parameter.

sqlcmd -S 192.555.5.555 -U SA -P ''

Where, SQL Server name (-S), the user name (-U), and the password is denoted by (-P).

For more info, visit:
https://www.microsoft.com/en-us/sql-server/sql-server-vnext-including-Linux
https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-ubuntu

Tags: Install Microsoft SQL on Linux, Install Microsoft SQL on Ubuntu, Install Microsoft SQL on Ubuntu 16.04, Install Microsoft SQL on Ubuntu 16.10, Install Microsoft SQL Server on Linux, Install Microsoft SQL Server on Ubuntu, Microsoft SQL Server Ubuntu, Microsoft SQL Server Ubuntu 16.04, Ubuntu 16.04 Install Microsoft SQL Server, Ubuntu 16.04 Microsoft SQL Server, Ubuntu 16.10 Install Microsoft SQL Server, Ubuntu Install Microsoft SQL, Ubuntu Install Microsoft SQL Server, Ubuntu Microsoft SQL Server

Primary Sidebar

Latest Posts

Downlaod Ubuntu 26.10 Stonking Stingray

How To Shutdown Linux With A 15 Minute Delay And Message

Using Linux Terminal How To Get Total Disk Size In GB

Count And Find Number Of Files In A Linux Directory Using Command

Check How Many Users Are Created In Linux Ubuntu

How To Check User Permissions In Linux Using Command

Check Which Folder Is Taking More Space In Ubuntu Linux

How to Install Claude Desktop App in Ubuntu Linux

Job Scheduling Using At Command In Linux With Examples

How To Check Permissions Of A Directory In Linux Command

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap