Skip to content

Instantly share code, notes, and snippets.

@Infiniti151
Last active September 1, 2026 10:40
Show Gist options
  • Select an option

  • Save Infiniti151/5ed250bbb323315418c46454677bf23d to your computer and use it in GitHub Desktop.

Select an option

Save Infiniti151/5ed250bbb323315418c46454677bf23d to your computer and use it in GitHub Desktop.
Fedora MS SQL Server Installation

Install MS SQL Server 2025 on Fedora 44

1. Installation & Setup

# Add Microsoft repository configurations
sudo dnf config-manager addrepo --from-repofile=https://packages.microsoft.com/config/rhel/9/mssql-server-2025.repo
sudo dnf config-manager addrepo --from-repofile=https://packages.microsoft.com/config/rhel/9/prod.repo

# Check for updates and install MS SQL Server and tools
sudo dnf check-update
sudo dnf -y install mssql-server mssql-tools

# Run the setup configuration
sudo /opt/mssql/bin/mssql-conf setup

# Disable the service from starting automatically (if desired)
sudo systemctl disable mssql-server.service

2. Add to Shell Path

Choose the block that corresponds to your shell:

For Bash (~/.bashrc):

echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc

For Zsh (~/.zshrc):

echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.zshrc
source ~/.zshrc

For Fish:

fish_add_path -U /opt/mssql-tools/bin

3. Reset SA Password

sudo /opt/mssql/bin/mssql-conf set-sa-password

4. Create a New User

Connect to SQL Server using sqlcmd:

sqlcmd -S localhost -U sa -C

Run the following SQL commands:

CREATE LOGIN <user> WITH PASSWORD = '<password>';
go

5. Login with the New User

sqlcmd -S localhost -U <user> -C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment