# How to list all users in PostgreSQL

> Learn how to list all users in PostgreSQL by running the du command in the psql interface, which also shows each role's attributes and group memberships.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2020-01-01 | Topics: [Database](https://flaviocopes.com/tags/database/) | Canonical: https://flaviocopes.com/postgres-how-to-list-all-users/

From the `psql` interface, run the `\du` command:

![List all users in PostgreSQL](https://flaviocopes.com/images/postgres-how-to-list-all-users/Screen_Shot_2019-12-19_at_09.55.46.png)

This will give you the list of all users in the system, plus their role attributes and the list of role groups they are member of.
