Few commands that need to do sudo
remind you that "You do not have the privilege" or "Are you root?" etc.
while a few commands do not give such message. For example, if you do fdisk -l
instead of sudo fdisk -l
ubuntu does not give any message. This is particularly confusing for people who come from different linux distro (eg: CentOS, RHEL etc.).
Wouldn't it be a good idea to notify user each time he commits such mistake, that he/she must be a sudoer to execute that particular command.
Many of these commands are old, and for historical reasons, have been available to only systems administrators. While it is a good idea to use
sudo
over logging as root, many old applications that are not specifically made for just Ubuntu/Debian are not made aware of there being asudo
functionality. While it would be trivial to make such a change, it would require quite a bit of work for many programs, some very obscure or forgotten. It is best to use gpart or a GUI in lieu of fdisk now.