{"id":106282,"date":"2025-05-20T06:09:00","date_gmt":"2025-05-20T06:09:00","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/?p=106282"},"modified":"2025-04-14T18:40:51","modified_gmt":"2025-04-14T18:40:51","slug":"sql-server-2022-on-ubuntu-24-04-step-by-step","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/sysadmin\/sql-server-2022-on-ubuntu-24-04-step-by-step\/","title":{"rendered":"SQL Server 2022 on Ubuntu 24.04 step by step"},"content":{"rendered":"\n<p>Microsoft does not yet support this edition of Ubuntu, but there are some workarounds to make it work. This should not be used for production usage and this blog is for educational\/testing purposes only.<\/p>\n\n\n\n<p>For my installation, I am using an AWS EC2 Ubuntu 24.04 with 2 GB of Ram. 2GB of RAM is the minimum required. This guide is targeted towards people who have installed SQL Server on previous versions of Ubuntu.<\/p>\n\n\n\n<p>It is not an unknown thing to want to do, as you can see in <a href=\"https:\/\/learn.microsoft.com\/en-us\/answers\/questions\/1685683\/how-to-install-sql-server-2022-on-ubuntu-server-24\">this thread on learn.microsoft.com<\/a>. So I went out to see what I would need to do. This guide contains the steps I went through.<\/p>\n\n\n\n<p>There are two major things I will cover installing. SQL Server itself, and then PowerShell Core.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-installing-sql-server-engine\">Installing SQL Server Engine<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-1-update-system-packages\">Step 1 Update system packages <\/h3>\n\n\n\n<p>To ensure that the host system is up-to-date.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">sudo apt update &amp;&amp; sudo apt upgrade -y<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-2-import-the-microsoft-sql-server-gpg-key\">Step 2: Import the Microsoft SQL Server GPG Key<\/h3>\n\n\n\n<p>This is the Gnu Privacy Guard key that will be used to encrypt and decrypt files in the install.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">wget -qO- https:\/\/packages.microsoft.com\/keys\/microsoft.asc | sudo tee \/etc\/apt\/trusted.gpg.d\/microsoft.asc<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-3-add-the-microsoft-sql-server-repository\">Step 3: Add the Microsoft SQL Server Repository<\/h3>\n\n\n\n<p>As I said before , Ubuntu 24.04 is still not supported by Microsoft, therefore we can use the Ubuntu 22.04 repository for that because it is compatible.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">sudo add-apt-repository \"$(wget -qO- <em>https:\/\/packages.microsoft.com\/config\/ubuntu\/22.04\/mssql-server-2022.list<\/em>)\"<\/pre><\/div>\n\n\n\n<p>After that do the system refresh again.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">sudo apt update<\/pre><\/div>\n\n\n\n<p>Now we need to install these packages to SQL server works because as of incompatibly with Ubuntu 24.04.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">wget http:\/\/archive.ubuntu.com\/ubuntu\/pool\/main\/o\/openldap\/libldap-2.5-0_2.5.11+dfsg-1~exp1ubuntu3_amd64.deb\n\nsudo dpkg -i libldap-2.5-0_2.5.11+dfsg-1~exp1ubuntu3_amd64.deb\n\nsudo apt install -y libcurl4 libssl-dev libgnutls30<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-4-install-and-configure-microsoft-sql-server\">Step 4: Install and Configure Microsoft SQL Server <\/h3>\n\n\n\n<p>The next few steps will do the installation steps.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-step-4a-execute-the-installation\">Step 4a: Execute the installation<\/h4>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">sudo apt install mssql-server\n\nsudo  \/opt\/mssql\/bin\/mssql-conf setup<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-step-4b-select-an-edition-and-set-a-sa-password\">Step 4b: Select an edition and set a sa password<\/h4>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1121\" height=\"583\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-1.png\" alt=\"\" class=\"wp-image-106284\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-1.png 1121w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-1-300x156.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-1-1024x533.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-1-768x399.png 768w\" sizes=\"auto, (max-width: 1121px) 100vw, 1121px\" \/><\/figure>\n\n\n\n<p><strong><\/strong>\n<\/p>\n\n\n\n<p>Most likely, you will select the <strong>developer edition (2)<\/strong> that has all features from the enterprise but you cannot use in production environments. This would likely be the only version you would want to install on the unsupported version of Linux.<\/p>\n\n\n\n<p>After that will prompt you to choose the language.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"501\" height=\"330\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screen-shot-of-a-computer-ai-generated-content.png\" alt=\"A screen shot of a computer\n\nAI-generated content may be incorrect.\" class=\"wp-image-106285\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screen-shot-of-a-computer-ai-generated-content.png 501w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screen-shot-of-a-computer-ai-generated-content-300x198.png 300w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/figure>\n\n\n\n<p>\n  \n<\/p>\n\n\n\n<p>The service is started automatically but you can check typing<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">systemctl status mssql-server --no-pager -l<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1147\" height=\"598\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-3.png\" alt=\"\" class=\"wp-image-106286\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-3.png 1147w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-3-300x156.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-3-1024x534.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-3-768x400.png 768w\" sizes=\"auto, (max-width: 1147px) 100vw, 1147px\" \/><\/figure>\n\n\n\n<p><em><\/em>\n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-5-install-sql-server-command-line-tools-sqlcmd-and-bcp\">Step 5: Install SQL Server Command-Line Tools (sqlcmd and bcp)<\/h3>\n\n\n\n<p>Add the Microsoft repository for SQL Server tools<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:tsql decode:true block\" >sudo add-apt-repository \"$(wget -qO- https:\/\/packages.microsoft.com\/config\/ubuntu\/22.04\/prod.list)\"<\/pre><\/div>\n\n\n\n<p>And update again:<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">sudo apt-get update<\/pre><\/div>\n\n\n\n<p>Next install mssql-tools:<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">sudo apt install mssql-tools unixodbc-dev<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1408\" height=\"347\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-4.png\" alt=\"\" class=\"wp-image-106287\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-4.png 1408w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-4-300x74.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-4-1024x252.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-4-768x189.png 768w\" sizes=\"auto, (max-width: 1408px) 100vw, 1408px\" \/><\/figure>\n\n\n\n<p><em><\/em>\n<\/p>\n\n\n\n<p>Next select <strong>&lt;yes&gt;<\/strong> for the license terms:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1529\" height=\"753\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screenshot-of-a-computer-ai-generated-content-m-9.png\" alt=\"A screenshot of a computer\n\nAI-generated content may be incorrect.\" class=\"wp-image-106288\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screenshot-of-a-computer-ai-generated-content-m-9.png 1529w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screenshot-of-a-computer-ai-generated-content-m-9-300x148.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screenshot-of-a-computer-ai-generated-content-m-9-1024x504.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screenshot-of-a-computer-ai-generated-content-m-9-768x378.png 768w\" sizes=\"auto, (max-width: 1529px) 100vw, 1529px\" \/><\/figure>\n\n\n\n<p>\n  \n<\/p>\n\n\n\n<p>And &lt;yes&gt; again for the next license terms (you can see in the title they are for different things.)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1531\" height=\"756\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screenshot-of-a-computer-ai-generated-content-m-10.png\" alt=\"A screenshot of a computer\n\nAI-generated content may be incorrect.\" class=\"wp-image-106289\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screenshot-of-a-computer-ai-generated-content-m-10.png 1531w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screenshot-of-a-computer-ai-generated-content-m-10-300x148.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screenshot-of-a-computer-ai-generated-content-m-10-1024x506.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screenshot-of-a-computer-ai-generated-content-m-10-768x379.png 768w\" sizes=\"auto, (max-width: 1531px) 100vw, 1531px\" \/><\/figure>\n\n\n\n<p>\n  \n<\/p>\n\n\n\n<p>Now let\u00b4s add the mssql-tools to the path variable. This way you can call sqlcmd from whatever you be<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">echo 'export PATH=\"$PATH:\/opt\/mssql-tools\/bin\"' &gt;&gt; ~\/.bash_profile\n\nsource ~\/.bash_profile<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-6-configure-the-firewall\">Step 6: Configure the Firewall <\/h3>\n\n\n\n<p>Let\u00b4s open the port 1433 to access our SQL Server remotely\u201d<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">sudo ufw allow 1433\/tcp \n\nsudo ufw reload<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-7-open-the-port-1433-on-aws\">Step 7 \u2013 Open the port 1433 on AWS<\/h3>\n\n\n\n<p>Next, in the AWS interface for your VM, select the Security tab:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1532\" height=\"480\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-7.png\" alt=\"\" class=\"wp-image-106290\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-7.png 1532w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-7-300x94.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-7-1024x321.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-7-768x241.png 768w\" sizes=\"auto, (max-width: 1532px) 100vw, 1532px\" \/><\/figure>\n\n\n\n<p>\n  \n   <strong> <\/strong>\n<\/p>\n\n\n\n<p>Select the security group<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1613\" height=\"482\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screenshot-of-a-computer-ai-generated-content-m-11.png\" alt=\"A screenshot of a computer\n\nAI-generated content may be incorrect.\" class=\"wp-image-106291\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screenshot-of-a-computer-ai-generated-content-m-11.png 1613w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screenshot-of-a-computer-ai-generated-content-m-11-300x90.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screenshot-of-a-computer-ai-generated-content-m-11-1024x306.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screenshot-of-a-computer-ai-generated-content-m-11-768x229.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/a-screenshot-of-a-computer-ai-generated-content-m-11-1536x459.png 1536w\" sizes=\"auto, (max-width: 1613px) 100vw, 1613px\" \/><\/figure>\n\n\n\n<p><strong><\/strong>\n<\/p>\n\n\n\n<p>Click on Edit Inbound Rules and click in the add Rule box<\/p>\n\n\n\n<p>Select the MSSQL in the combo box and 0.0.0.0\/0 to open the port 1433:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1632\" height=\"288\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-9.png\" alt=\"\" class=\"wp-image-106292\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-9.png 1632w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-9-300x53.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-9-1024x181.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-9-768x136.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-9-1536x271.png 1536w\" sizes=\"auto, (max-width: 1632px) 100vw, 1632px\" \/><\/figure>\n\n\n\n<p>\n  \n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-8-enable-sql-server-agent\">Step 8 \u2013 Enable SQL Server agent<\/h3>\n\n\n\n<p><em>If you need the SQL Server Agent, this will enable it for use:<\/em><\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">sudo \/opt\/mssql\/bin\/mssql-conf set sqlagent.enabled true\n\nsudo systemctl restart mssql-server<\/pre><\/div>\n\n\n\n<p>Now you can just connect over the SSMS using the public IPv4 Adress and <code>sa<\/code> password.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1898\" height=\"955\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-10.png\" alt=\"\" class=\"wp-image-106293\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-10.png 1898w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-10-300x151.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-10-1024x515.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-10-768x386.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-10-1536x773.png 1536w\" sizes=\"auto, (max-width: 1898px) 100vw, 1898px\" \/><\/figure>\n\n\n\n<p>\n  \n<\/p>\n\n\n\n<p>Or you can use sqlcmd<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">sqlcmd -S localhost -U sa -P '&lt;password&gt;'<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"983\" height=\"554\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-11.png\" alt=\"\" class=\"wp-image-106294\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-11.png 983w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-11-300x169.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-11-768x433.png 768w\" sizes=\"auto, (max-width: 983px) 100vw, 983px\" \/><\/figure>\n\n\n\n<p><em><\/em>\n<\/p>\n\n\n\n<p>And if we refresh the SSMS:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"357\" height=\"690\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-12.png\" alt=\"\" class=\"wp-image-106295\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-12.png 357w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-12-155x300.png 155w\" sizes=\"auto, (max-width: 357px) 100vw, 357px\" \/><\/figure>\n\n\n\n<p>\n  \n<\/p>\n\n\n\n<p>There are plenty of configurations that you can apply to your instance . To check the list and what is use (or do it in the SSMS)<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">sudo \/opt\/mssql\/bin\/mssql-conf list<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-installing-powershell-core\">Installing PowerShell Core <\/h2>\n\n\n\n<p>Next we will install PowerShell Core.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-1-download-the-required-installable-files-for-powershell\">Step 1 \u2013 Download the required installable files for PowerShell<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">wget -q https:\/\/packages.microsoft.com\/config\/ubuntu\/$(lsb_release -rs)\/packages-microsoft-prod.deb -O packages-microsoft-prod.deb<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-2-install-the-files\">Step 2 \u2013 install the files<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">Sudo dpkg -i packages-microsoft-prod.deb<\/pre><\/div>\n\n\n\n<p><strong>Step 3- Update the repository with the latest changes or updates from the Microsoft Updates CDN related to \u2018Powershell\u2019 commands or features updates and install \u2018Powershell\u2019 <\/strong><\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">Sudo apt-get update -y\n\nSudo apt-get install powershell -y<\/pre><\/div>\n\n\n\n<p><strong>Then it is just call Powershell and test it out.<\/strong><\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">pwsh<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1538\" height=\"768\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-13.png\" alt=\"\" class=\"wp-image-106296\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-13.png 1538w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-13-300x150.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-13-1024x511.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-13-768x384.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-13-1536x767.png 1536w\" sizes=\"auto, (max-width: 1538px) 100vw, 1538px\" \/><\/figure>\n\n\n\n<p>\n  \n<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-extra-installing-sql-server-module-on-powershell\">Extra: Installing SQL Server module on Powershell<\/h3>\n\n\n\n<p>To install the sql server module it is just (on Powershell terminal)<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">install-module sqlserver<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1559\" height=\"248\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-14.png\" alt=\"\" class=\"wp-image-106297\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-14.png 1559w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-14-300x48.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-14-1024x163.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-14-768x122.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-14-1536x244.png 1536w\" sizes=\"auto, (max-width: 1559px) 100vw, 1559px\" \/><\/figure>\n\n\n\n<p>\n  \n<\/p>\n\n\n\n<p>And now we can use the sql server module<\/p>\n\n\n\n<p>To check whit cmdlets you can use :<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">get-command -Module sqlserver<\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1542\" height=\"765\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-15.png\" alt=\"\" class=\"wp-image-106298\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-15.png 1542w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-15-300x149.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-15-1024x508.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-15-768x381.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2025\/04\/word-image-106282-15-1536x762.png 1536w\" sizes=\"auto, (max-width: 1542px) 100vw, 1542px\" \/><\/figure>\n\n\n\n<p><em><\/em>\n<\/p>\n\n\n\n<p>If you want to use your favorite PowerShell library, like dbatools, you can now install it. For example, for dbatools:<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"block\" highlight=\"false\" decode=\"true\">Install-module dbatools<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>Now you should have a fully operational version of SQL Server running on the new version of Ubuntu. As a reminder, this is not supported yet, and should only be used for educational\/testing purposes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft does not yet support this edition of Ubuntu, but there are some workarounds to make it work. This should not be used for production usage and this blog is for educational\/testing purposes only. For my installation, I am using an AWS EC2 Ubuntu 24.04 with 2 GB of Ram. 2GB of RAM is the&#8230;&hellip;<\/p>\n","protected":false},"author":221715,"featured_media":106300,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[143524,8],"tags":[4878,4151],"coauthors":[6819],"class_list":["post-106282","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sql-server","category-sysadmin","tag-linux","tag-sql-server"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/106282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/221715"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=106282"}],"version-history":[{"count":2,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/106282\/revisions"}],"predecessor-version":[{"id":106301,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/106282\/revisions\/106301"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media\/106300"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=106282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=106282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=106282"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=106282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}