← Users & Permissions
Linux · Users & Permissions
How to check sudo privileges in Linux
Check what sudo access a user has with sudo -l, and where it is configured in /etc/sudoers and /etc/sudoers.d.
Check what commands a user may run with sudo. sudo -l lists your own rights; the rules live in /etc/sudoers and the drop-in files under /etc/sudoers.d.
# What you may run with sudo
sudo -l
# For another user (run as root)
sudo -l -U <user>
# Where rules live - always edit with visudo, never a plain editor
sudo cat /etc/sudoers
ls -l /etc/sudoers.d/
# Who is in the wheel / sudo group
getent group wheel
getent group sudoLinuxsudoPermissions