{
  "id": 5367048,
  "title": "From Zero to Hero on psql: My Weekend Adventure Installing PostgreSQL on WSL 🐧🐘",
  "url": "https://urgent.news/2026/09/03/from-zero-to-hero-on-psql-my-weekend-adventure-installing-postgresql",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-03T16:50:55.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/jontech/-from-zero-to-psql-my-weekend-adventure-installing-postgresql-on-wsl-53ki"
  },
  "original_language": "en",
  "account": "Hey there! So, I had a weekend adventure installing PostgreSQL on Windows Subsystem for Linux (WSL). My senior dev friend recommended using WSL for a real Linux environment, and I'm thrilled I took their advice. Here's how I did it:\n\n1. What is WSL?\nWSL stands for Windows Subsystem for Linux. It's Microsoft's way of running a real Linux kernel inside Windows without needing a dual boot or virtual machine. This is perfect for backend development, databases, and DevOps.\n\n2. Installing WSL\nInstalling WSL is as easy as running a one-liner in PowerShell as an administrator. Type `wsl --install`, hit Enter, and let it install. After a restart, launch Ubuntu from your Start Menu. Remember, your Ubuntu login is separate from your Windows account.\n\n3. Update Ubuntu\nInside Ubuntu, run `sudo apt update && sudo apt upgrade -y`. This refreshes the package lists and updates existing software. It might take a few minutes, perfect for a coffee break.\n\n4. Install PostgreSQL\nNow for the main event: PostgreSQL. Install it with `sudo apt install postgresql postgresql-contrib -y`. Start the PostgreSQL service with `sudo service postgresql start` and verify it's running with `sudo service postgresql status`.\n\n5. Meet postgres\nWhen PostgreSQL installs, it creates a Linux system user called 'postgres' and a PostgreSQL database role also named 'postgres'. This 'postgres' role is the superuser of your database, with full administrative rights.\n\n6. Log into psql\npsql is PostgreSQL's command-line interface. Log in as the superuser with `sudo -i -u postgres psql`. Your terminal prompt should now say 'postgres=#'. To exit, type `\\q`.\n\n7. Create Your Own User\nIt's a good practice not to live as 'postgres' forever. While still logged in as 'postgres', create your own user: `CREATE USER student_dev WITH PASSWORD 'yourStrongPassword123';`. Replace 'student_dev' with your desired username and choose a secure password.",
  "summary": "Hey folks! 👋 So here's the deal — last weekend I decided I was done fighting with database installers that never quite worked right on Windows. A senior dev friend of mine said, \"just use WSL and run it like you're on a real Linux box,\" and honestly? Best advice I got all semester. So grab your coffee (or chai, no judgment ☕), and let's walk through this together, step by step, exactly how I did…",
  "key_points": [
    "WSL enables running Linux inside Windows without dual boot",
    "Install WSL via PowerShell command wsl --install",
    "Create PostgreSQL superuser 'postgres' during installation"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}