• 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

Delete Directory And Contents Recursively Without Prompt On Linux

Check User Login History In Ubuntu Linux Command Line

Use Locate Command To Find File In Linux Terminal By Name

How To Change Terminal Color In Ubuntu Command Line

How To Run Fsck Manually In Linux To Fix Unexpected Inconsistency

How To Fix Broken Packages On Ubuntu From Terminal

Re Execute The Previous Command In Linux Ubuntu Command Line

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

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

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