# ACL LIST

> Return every ACL user as a line in the ACL file format.

URL: https://docs.hotkv.com/commands/acl-list/

```
ACL LIST
```

- Group: ACL
- Complexity: O(N) where N is the number of users
- HotKV Cloud: all plans
- On-Premise: no license needed

`ACL LIST` returns one line per user, sorted by name, in the same format as
the `aclfile` that [ACL SAVE](https://docs.hotkv.com/commands/acl-save/index.md) writes. Each line starts
with `user <name>`, followed by the user's state, its password hashes
(`#<sha256>`), key patterns, channel patterns and command rules, then any
selectors in parentheses. Feeding a line back to
[ACL SETUSER](https://docs.hotkv.com/commands/acl-setuser/index.md) (without `user <name>`) recreates the
user.

A user without access to every channel gets `resetchannels` before its
channel patterns, so the line means the same whatever `acl-pubsub-default`
the server reading it uses.

## Return value

Array of bulk strings in RESP2 and RESP3.

## Examples

```
127.0.0.1:6379> ACL LIST
1) "user alice on sanitize-payload #1ec1c26b50d5d3c58d9583181af8076655fe00756bf7285940ba3670f99fcba0 ~app:* %R~shared:* resetchannels &news:* -@all +@read +set"
2) "user default on nopass sanitize-payload ~* &* +@all"
```

## Compatibility

Same format as Redis 7 and Valkey 8.

## See also

[ACL USERS](https://docs.hotkv.com/commands/acl-users/index.md), [ACL GETUSER](https://docs.hotkv.com/commands/acl-getuser/index.md),
[ACL SAVE](https://docs.hotkv.com/commands/acl-save/index.md)