Install psql
and use below command from shell
psql postgres://username:password@hostname:5432/db_name
# With some params
psql postgres://username:password@hostname:5432/db_name?application_name=root_connection
\l
\c <DB_NAME>
\d
\d <TABLE_NAME>
\d+ <TABLE_NAME>
select column_name, data_type from information_schema.columns where table_name = '<table_name>'
\x