In my sudo
command, if I don't mention username
, will it take root
as the default user? For example, In the following command-
sudo mkdir /tmp/computerLinux/
using which target user will it execute the command?
Yes, from manual of sudo
:
-u The -u (user) option causes sudo to run the specified command as a user other than root. To specify a uid instead of a username, use #uid.
man
page reads: "sudo - execute a command as another user" :-)sudo
grants all permissions to the requesting sudoer. The ~ dir of root is/root
not/home/root
Thus you are able to edit / delete files inside/root
withsudo