I typed psql and I get this:
psql
psql: could not connect to server: No such file or directory Is the server running locally and accepting con
If your service is not secure, this may be the reason
vi /etc/postgresql/11/main/pg_hba.conf
host all all localhost trust md5
you can remove the trust keyword
save pg_hba.conf
sudo service postgresql restart.