Definition:

  • execute a command as another user, default to root

Synopsis:

  • sudo -l [-ABknS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command]

List of options:

  • -l, --list
    • If no command is specified, list the allowed (and forbidden) commands for the invoking user (or the user specified by the -U option) on the current host.
      • A longer list format is used if this option is specified multiple times and the security policy supports a verbose output format.
    • If a command is specified and is permitted by the security policy, the fully-qualified path to the command is displayed along with any command line arguments.
      • If a command is specified but not allowed by the policy, sudo will exit with a status value of 1.