title: How to connect to windows postgres Database from WSL
body: <p>I'm running Postgres 11 service on my Windows computer.
  How can I connect to this database from WSL?</p>
  <p>When I try <code>su - postgres</code>:</p>
  <pre><code>postgres@LAPTOP-NQ52TKOG:~$ psql 
  psql: could not connect to server: No such file or directory 
          Is the server running locally and accepting
          connections on Unix domain socket &quot;/var/run/postgresql/.s.PGSQL.5432&quot;
  </code></pre>
  <p>It's trying to connect to a Postgres in WSL. I don't want to run Ubuntu Postgres using:
  <code>sudo /etc/init.d/postgresql start</code></p>