I have setup Microsoft SQL Server on an Ubuntu VM.

I know how to connect to SQL Server on Windows using SSMS -> but unfortunately I can not install SSMS on Ubuntu.

Which leads me to the question at hand of how would I do this from the terminal using sqlcommand?


2 Answers 2


1st you need to identify your VM IP address, supposing it is

sqlcmd -S -U SA -P "YourPassword"

Either check connectivity between your host and your VM using



telnet 1433

Read detailed instructions on Microsoft's link below:

sqlcmd on Linux

Regarding to web connection, there's no guarantee to be able to connect to the VM via web, that imply many aspects.

  • I've include some steps to check the connection.
    – Rogerlr
    May 18, 2018 at 17:30

Microsoft SQL Operations Studio, which works on Linux, Mac, and Windows, is a feature-rich SQL Server-compatible graphical client.

Assuming your VM has the appropriate ports open in it's firewall, you should be able to connect using the IP address of the VM to connect to the SQL Server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.