ll---list Verified current stable Not installed? System Operations

Ll List / List Allowed Forbidden Commands

List Allowed Forbidden Commands

View the list of commands a user can or cannot execute via sudo.

$
Terminal
sudo -ll

When To Use

During access control audits or compliance checks to ensure appropriate permissions are set.

Pro Tip

Use `sudo -l -U user` to specify a particular user for checking permissions.

Anatomy of Output

Understanding the result

Matching Defaults for user: !visiblepw Default Setting

Indicates specific restrictions applied to user.

(ALL) ALL Permitted Commands

Indicates user can execute any command as any user.

(ALL) NOPASSWD: /usr/bin/systemctl restart service Command Allowed without Password

Enumerates command that can be executed without needing a password.

Troubleshooting

Common pitfalls

sudo: unknown user: nonexistent

Solution: Check username before verifying sudo permissions.

sudo: unable to parse configuration file

Solution: Inspect `/etc/sudoers` for syntax errors.

sudo: Command not found

Solution: Ensure sudo is correctly installed and configured.

Command Breakdown

What each part is doing

sudo
Base Command
The executable that performs this operation. Here it runs Ll List before the shell applies any redirect operators.
-ll
ll| list list
The value supplied for ll| list list.
-ll
Command Option
Tool-specific option used by this command invocation.

Alternative Approaches

Comparable commands in other tools

Alternative system operations tools for the same job.