This question already has an answer here:

I can open a shell for a system user by calling

sudo su - systemuser -s /bin/bash


sudo su -s /bin/bash systemuser

What's the difference between those commands? They look pretty identical to me.


The system user has a .bashrc file in his home directory. When using the first command, this file is not included, whereas when issuing the second it is.

marked as duplicate by Mokubai Apr 15 '16 at 6:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • The only real difference between those two commands is the lone "-" in there. What that does is explained by the accepted answer in the duplicate. – Mokubai Apr 15 '16 at 6:39
  • @Mokubai There must be more differences. When using the first command aliases are not available, whereas with the second one there are. Also different PATH variables are set. – Tom Crude Apr 15 '16 at 7:30
  • If either that or the current dupe doesn't answer your question then I'll reopen it. – Mokubai Apr 16 '16 at 8:05

Browse other questions tagged or ask your own question.