sudo apt update
sudo apt install postgresql postgresql-contribsudo -i -u postgresYou can now access a Postgres prompt immediately by typing:
psqlsudo -u postgres psqlsudo -u postgres createuser --interactiveThe script will prompt you with some choices and, based on your responses, execute the correct Postgres commands to create a user to your specifications.
Enter name of role to add: krishna
Shall the new role be a superuser? (y/n) ysudo -u postgres createdb\password