Main File Directory Structure of SQL Server on Linux

During the exploration of the SQL Debian package, we discussed what all the files get installed at which location on Linux machine. However, there are some important folders and files which I would say to remember when you are working on Linux machine. You may find them helpful, if you want to troubleshoot some issue or want to change SQL Server level settings.

To make things easier for you, I have listed down all those folders, files, and their description so that you can refer this post to recall them. 

Folder / file Use /Description
/opt/mssql/bin This folder contains the ELF files and configuration files in order to start the SQL Server on Linux
/opt/mssql/bin/sqlservr Binary for starting the SQL Server from Linux
/opt/mssql/bin/mssql-conf Script to change the TCP port / folders (Data/Log/Backup) / trace flag of SQL Server.  To get more details on this, you can follow the article – SQL Server Configuration Manager on Linux
/opt/mssql/lib This folder stores libraries in which the library OS and SQL Server binary files for Windows are sandboxed
/opt/mssql/lib/mssql-conf The directory “/opt/mssql/bin/mssql-conf” contains scripts of actual processing of “/opt/mssql/bin mssql-conf” are placed.
/opt/mssql-tools The folder /usr/bin/sqlcmd and /usr/bin/bcp stores SQL Server Tools (bcp/sqlcmd) binary entities
/opt/microsoft/msodbcsql It stores the msodbcsql details
/var/opt/mssql The default directory that is configured as a Linux root path
/var/opt/mssql/data The default directory of the database file
/var/opt/mssql/log The default location of Errorlog/default trace /system health of SQL Server on Linux
/var/opt/mssql/.system Something like use profile —> WSL of% USERPROFILE%\AppData\Local\lxss
/var/opt/mssql/mssql.conf SQL Server startup configuration file. When SQL Server starts the customized values & parameters are read from this mssql.conf file.
/lib/systemd/system/mssql-server.service Definition file of systemd of the SQL Server Database Engine  /opt/mssql/bin/sqlservr
/lib/systemd/system/mssql-server-telemetry.service Definition file of systemd of the SQL Server Telemetry Service  /opt/mssql/bin/sqlservr-telemetry

Do you find it useful, do let me know via comments?

2 thoughts on “Main File Directory Structure of SQL Server on Linux

  • krishna Reddy

    yes,its more useful.

    Reply
  • Vishnu

    Good info and nicely explained,,,

    Reply

Leave a comment

Your email address will not be published. Required fields are marked *