last tested on Xenial Xerus(16.04)
First add the postgresql repo to PC's sources list...
echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' | sudo tee -a /etc/apt/sources.list.d/test.list > /dev/nullthen ...
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -then ...
sudo apt updatethen ....
sudo apt install postgresql-10sudo nano /etc/postgresql/10/main/pg_hba.confor ...
sudo vi /etc/postgresql/10/main/pg_hba.conf... if you don't have nano installed and you're a god.
You can change peer to trust or md5, then restart server
sudo service postgresql restartpsql -U postgrescreatedb -U postgres database_namepsql -U postgres database_nameor if already in the psql shell,
\c database_nameupdated frequently (i.e. as I run into more)
\l=> list available databases in current Postgres server\dt=> list all tables in current db\q=> exit psql\d table_name=> shows details/schema of passedtable_name