Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from Aug 20 '13 at 8:31

This question came from our site for professional and enthusiast programmers.

sudo means "root user". So, it will obviously take the credentials of the "root" account. – palerdot Aug 20 '13 at 6:06
@palerdot: Yet the headline of the man page reads: "sudo - execute a command as another user" :-) – NPE Aug 20 '13 at 6:11
up vote 3 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.