Hi Pratik ,
Welcome to Microsoft Q&A Forum!
You can follow below troubleshooting steps-
1.Check if SQL Server Installed Correctly-
dpkg -l | grep mssql-server
2.Check Service Status
systemctl status mssql-server
If its not running :
sudo systemctl start mssql-server
sudo systemctl enable mssql-server
3.Connect to SQL Server
Install the SQL command-line tools:
sudo apt install -y mssql-tools unixodbc-dev
Then connect:
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourPassword'
If the configuration step fails repeatedly, you can reset and re-run:
sudo systemctl stop mssql-server sudo rm -rf /var/opt/mssql/* sudo /opt/mssql/bin/mssql-conf setup.
You can also refer troubleshooting guides-
https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-troubleshooting-guide?view=sql-server-ver17#connection
https://www.sqlshack.com/sql-server-installation-troubleshooting-on-ubuntu/
I hope this helps!
Let me know how did that go for you.
Thank You