Steps :
Import the public repository GPG keys:
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
Register the Microsoft SQL Server Ubuntu repository:
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list)"
Update the sources list:
sudo apt-get update
Install SQL Server:
sudo apt-get install -y mssql-server
After the installation is complete, run the configuration script:
sudo /opt/mssql/bin/mssql-conf setup
Once the configuration is done, check the status of the service:
systemctl status mssql-server