Command explanations useradd -d /var/pgsql/data postgres: Add an unprivileged user to run the database server. createdb test, create table t1 , insert into t1 values..., select * from t1: Create a database, add a table to it, insert some rows into the table and select them to verify that the installation is working properly.