Skip to main content

Command Palette

Search for a command to run...

Instructions for installing SQL Server on Ubuntu 18.04 or 20.04

Updated
1 min read
F
I am an Infrastructure and DevOps Engineer specializing in designing, building, and operating scalable, secure, and highly available cloud infrastructure. My core focus is on Microsoft Azure cloud platforms, Infrastructure as Code (IaC), and DevOps automation to support reliable production systems. I work across cloud infrastructure engineering, DevOps practices, and site reliability engineering (SRE) principles to ensure systems are resilient, observable, and optimized for performance, cost, and scalability. My experience includes designing and managing cloud environments across compute, networking, storage, identity, and security layers. I build Infrastructure as Code solutions using Terraform and Azure Resource Manager (ARM) templates to automate provisioning, configuration, and deployment of cloud resources. I am actively involved in improving system reliability through monitoring, logging, and incident response processes using tools such as Azure Monitor and cloud-native observability solutions. I also participate in on-call operations, production support, and incident management to ensure high availability of critical systems. Security is a core part of my engineering approach. I work with identity and access management (IAM), Azure Active Directory, and cloud security best practices to ensure infrastructure remains compliant, secure, and audit-ready in line with industry standards such as ISO 9001 and ISO 27001. I collaborate with cross-functional teams including software engineers, DevSecOps, and product teams to deliver infrastructure solutions for customer-facing applications and enterprise platforms. My technical interests and growth areas include: Cloud Infrastructure Engineering (Azure, AWS, GCP) Site Reliability Engineering (SRE) Platform Engineering Kubernetes & Container Orchestration Infrastructure as Code (Terraform, ARM) CI/CD Pipeline Automation Distributed Systems & System Design Cloud Security & Identity Management I am passionate about building systems that are not only scalable and efficient but also reliable and easy for engineers to use. I am continuously growing my expertise toward senior-level Infrastructure, SRE, and Platform Engineering roles, including global remote opportunities.

To install SQL Server on Ubuntu 18.04 or 20.04, you will need to follow these steps:

  1. Import the Microsoft GPG key using the following command:
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
  1. Register the Microsoft SQL Server Ubuntu repository:
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/18.04/mssql-server-2019.list)"

Note: If you are using Ubuntu 20.04, you will need to use the following repository instead:

sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list)"
  1. Update the package cache and install SQL Server:
sudo apt-get update
sudo apt-get install -y mssql-server
  1. Once the installation is complete, run the following command to configure your SQL Server instance:
sudo /opt/mssql/bin/mssql-conf setup
  1. Follow the prompts to set the SA password and choose your SQL Server edition.

  2. Once the configuration is complete, start the SQL Server service using the following command:

sudo systemctl start mssql-server

You should now be able to connect to your SQL Server instance from your application. To confirm that SQL Server is running, you can use the following command:

systemctl status mssql-server

I hope this helps! Let me know if you have any questions.

Thanks for reading...

Happy Coding!

More from this blog

Building Reliable Systems

93 posts

Insights on Infrastructure, DevOps, SRE, and building reliable systems at scale.