I did this lab in the ann account of my Ubuntu 16.04 host and it was easy.
(Remember that class01 had a lab to install Ubuntu 16.04 on your laptop).
sudo apt update sudo apt install postgresql postgresql-server-dev-all libpq-dev sudo su - postgres /usr/bin/psql
The psql shell command above, gave me a psql prompt.
I typed these Postgres commands at the psql prompt:
create role ann with login superuser password 'ann'; create database ann; \q
Next, I remembered to exit from the postgres linux account by typing the shell command: exit
Then, I wrote a shell script to 'wrap' the psql command for the ann account:
#!/bin/bash # This script should 'wrap' the psql command /usr/bin/psql -aP pager=no $@
I placed the above script in ~ann/bin/psql.bash