You then need to restart your PC, and after a long time the Linux subsystem will ask for a username and password.
You must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11, and the command wsl –install via PowerShell or Windows Command Prompt run as administrator. Installing WSL was easy and painless for me, and the Microsoft WSL documentation was excellent.
Installing WSL2 Linux (Ubuntu) on Windows 10/11
Here are the steps I took to install PostgreSQL using Windows Subsystem for Linux. That means I only need to learn a few Linux commands and manage PostgreSQL from Windows, which is great. But I found a application that is like Microsoft’s SSMS (SQL Server Management Studio) application with a nice GUI front-end called pgAdmin and it even has a Windows version.
Using WSL does need me to learn a few Linux commands, such as how to start / stop the PostgreSQL code and there is a PostgreSQL Linux app called psql which uses terminal commands to manage the PostgreSQL server etc. I haven’t used Linux before and I don’t really want to learn Linux unless I need to, so I wanted to find ways to use Windows commands as much as possible. Up until now I have only used PostgreSQL via Azure, but I wanted a local PostgreSQL server to unit test for my library AuthPermissions.AspNetCore which will support SQL Server or PostgreSQL.
I’m a software developer, mainly working on ASP.NET Core and EF Core, and I use Windows as my development system. Setting the scene – why am I installing PostgreSQL NET application running on Windows, and some suggestion on how to unit test against a real PostgreSQL database. See the second article on how to access a PostgreSQL database from a.Had to be careful to get the correct values set up, but once I had done that once it remembers it for next time.