I have looked at the majority of “Command Not Found” errors with Postgres and none of them are similiar to what I am running into. On my server Postgres is running effectively, as I can log into an individual database with no issues; however, when logging into the server as user postgres to run commands such as \list or create new databases I get the following error:
-bash-4.1$ \list
-bash: list: command not found
Any ideas as to why this is happening. When I was trying to troubleshoot this I thought I might be in the wrong directory so I ran pwd and this is what I get:
-bash-4.1$ pwd
/var/lib/pgsql
Any help is greatly appreciated. Thank you.
\listis no bash command, but from the command/output you posted it looks you are tryin to call it directly from within bash.First run the
psqlcommand, when you have you should have an interactive session with it. There you should be able to use the\listcommand. You can read more about this here.