Microsoft just launched SQL Server vNEXT CTP1 for Linux, below is tutorial for installing SQL Server on Ubuntu


  1. Internet connection
  2. At least Ubuntu 16.04 64bit

Here’s the steps to install SQL Server on Ubuntu

  1. Import the public repository GPG keys

    curl | sudo apt-key add –

  2. Add Microsoft SQL Server Ubuntu repository

    curl | sudo tee /etc/apt/sources.list.d/mssql-server.list

  3. Run commands below

    sudo apt-get update

    sudo apt-get install -y mssql-server

  4. Once the installation finish, run the script to install

    sudo /opt/mssql/bin/sqlservr-setup

  5. Once it’s done, register SQL Server services to the system

    systemctl status mssql-server

Install SQL Server Tools

The following steps install the command-line tools, Microsoft ODBC drivers, and their dependencies. The mssql-tools package contains:

  • sqlcmd: Command-line query utility.
  • bcp: Bulk import-export utility.

Install tools on Linux

  1. RHEL

    sudo su

    curl > /etc/yum.repos.d/msprod.repo


    sudo yum install mssql-tools

  2. Ubuntu

    curl | sudo apt-key add –

    curl | sudo tee /etc/apt/sources.list.d/msprod.list

    sudo apt-get update

    sudo apt-get install mssql-tools