Quote:
Is there a way to get to the same directory where you just were after switching to root with "$ su -"? I'm installing MythTV and in the instructions it seems like he has it set up that way. (If I was in /usr/src/packages/RPMS/i686 as user I want to start in /usr/src/packages/RPMS/i686 as root after "$ su -".)
[/b]
|
Short answer: no. When you add the dash (-) to su, it runs the users login profile settings, thus logging you in as that user (basically). You get all the environment settings of that user and run that users .profile. If you don't need the user environment, leave the - off, but that may cause issues with what you are doing.
Another option is sudo. Sudo bash would give you a root shell in the current directory. That is generally the way I do things on all my Unix systems. There are a few things I have encountered that don't work properly, but by and large, everything should work with sudo that way.
Hope that helps.
Z.