Skip to content

Latest commit

 

History

History
155 lines (106 loc) · 3.66 KB

File metadata and controls

155 lines (106 loc) · 3.66 KB
author rwestMSFT
ms.author randolphwest
ms.date 08/12/2025
ms.service sql
ms.topic include
ms.custom
linux-related-content

Use the following steps to install the mssql-tools18 on Ubuntu.

  • Ubuntu 24.04 is supported in preview starting with [!INCLUDE sssql25-md].
  • Ubuntu 22.04 is supported starting with [!INCLUDE sssql22-md] CU 10.
  • Ubuntu 20.04 is supported starting with [!INCLUDE sssql19-md] CU 10.
  • Ubuntu 18.04 is supported starting with [!INCLUDE sssql19-md] CU 3.
  1. Enter superuser mode.

    sudo su
  2. Import the public repository GPG keys.

    curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
  3. Register the Microsoft Ubuntu repository.

    curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list
  4. Exit superuser mode.

    exit
  1. Enter superuser mode.

    sudo su
  2. Import the public repository GPG keys.

    curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
  3. Register the Microsoft Ubuntu repository.

    curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list
  4. Exit superuser mode.

    exit
  1. Enter superuser mode.

    sudo su
  2. Import the public repository GPG keys.

    curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
  3. Register the Microsoft Ubuntu repository.

    curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list
  4. Exit superuser mode.

    exit

Use the following steps to install the mssql-tools18 for [!INCLUDE sssql25-md] on Ubuntu 24.04 in preview.

  1. Enter superuser mode.

    sudo su
  2. Register the Microsoft repository for Ubuntu 24.04.

    curl -sSL -O https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb
  3. Install the repository package:

    sudo dpkg -i packages-microsoft-prod.deb
  4. Exit superuser mode.

    exit

  1. Update the sources list and run the installation command with the unixODBC developer package.

    sudo apt-get update
    sudo apt-get install mssql-tools18 unixodbc-dev

    To update to the latest version of mssql-tools, run the following commands:

    sudo apt-get update
    sudo apt-get install mssql-tools18
  2. Optional: Add /opt/mssql-tools18/bin/ to your PATH environment variable in a bash shell.

    To make sqlcmd and bcp accessible from the bash shell for login sessions, modify your PATH in the ~/.bash_profile file with the following command:

    echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bash_profile
    source ~/.bash_profile

    To make sqlcmd and bcp accessible from the bash shell for interactive/non-login sessions, modify the PATH in the ~/.bashrc file with the following command:

    echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc
    source ~/.bashrc