> For the complete documentation index, see [llms.txt](https://ploegert.gitbook.io/til/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ploegert.gitbook.io/til/programmy/linux/is-app-installed/database-operations/list-all-the-databases.md).

# List All The Databases

There are two ways to list all the available databases. The first is a `psql` only command:

```
\list
```

The second approach is to query the `pg_database` table. Something like the following will suffice:

```sql
select datname from pg_database;
```
