Postgres Installation
Topics
Source:
Change the password for the postgres Linux account. Choose a strong password and store it in a secure place.
Switch over to the postgres account.
Change the password for the postgres PostgreSQL user to use when connecting over a network.
psql -c "ALTER USER postgres WITH PASSWORD 'newpassword'"
Check all installed Extensions
From the Linux shell, while logged in as postgres, create a test database using the createdb command.
Connect to the new database directly.
Check currently logged in user
While you are logged into PostgreSQL, you can switch to a different database using the \c meta-command.
Run the command from the Linux shell while logged in as postgres.