createdb is a shell command, not a postgres command, so it doesnβt show an error or success message.
To create a database from your terminal, you must do this.
sudo -u postgres createdb databaseName
To create a database from the postgres command, you need to run the following command one by one
sudo -u postgres psql CREATE DATABASE testDB;
If the database is successfully created, you will receive a message about the successful completion with the command "CREATE DATABASE"

To see a list of your database, write this command
\l
source share