using pg in cmd code example Example: how to access postgres CLI # User postgres is default. It then may ask you for password. psql -U postgres