Complete the command to install PostgreSQL on Ubuntu.
sudo apt-get [1] postgresqlThe install command is used with apt-get to install new packages like PostgreSQL.
Complete the command to start the PostgreSQL service.
sudo systemctl [1] postgresqlThe start command launches the PostgreSQL service so it can run.
Fix the error in the command to switch to the PostgreSQL user.
sudo [1] -i -u postgresThe su command is used to switch users in Linux, here to the 'postgres' user.
Fill in the blank to create a new PostgreSQL database named 'mydb'.
createdb [1]The createdb command followed by the database name creates a new database. Here, 'mydb' is the name.
Fill all three blanks to connect to the 'mydb' database as user 'postgres' on localhost.
psql -U postgres -[1] [2] -h [3]
The psql command uses -U postgres to specify the user, -d for the database, and -h for the host. Here, user is 'postgres', database is 'mydb', and host is 'localhost'.