title: PostgreSQL: Why psql can't connect to server?
body: <p>I typed <code>psql</code> and I get this:</p>
  <pre><code>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>I used <code>sudo netstat -nlp | grep 5432</code> to see the status but nothing showed.
  And I searched online, somebody told me to modify <code>pg_hba.conf</code> but I can't <code>locate</code> this file. And I also tried this command <code>sudo ln -s /tmp/.s.PGSQL.5432 /var/run/postgresql/.s.PGSQL.5432</code>. It can't work.</p>