0

What is the difference between switch users in linux with:

su root

and

su -
Justin
  • 5,328
  • 19
  • 64
  • 84

1 Answers1

5

su root (also can be written as su) does not spawn a login shell

su - does spawn a login shell.

nothing is sourced when using the first (eg. .bash_profile, .profile, etc.)

ptierno
  • 166
  • 7