LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   bash: su - changes directory to /root (https://www.linuxquestions.org/questions/linux-software-2/bash-su-changes-directory-to-root-192517/)

arpi 06-11-2004 07:50 PM

bash: su - changes directory to /root
 
hello,


in bash, whenever i do:

>su root

the directory changes to /root but i would like to keep the same directory i had (like /home/something) before the 'su root.' i looked at the shell variables but i don't see any for that specific reason.

which one is it?

TX

DrOzz 06-11-2004 08:14 PM

use :
Code:

su -m
and that will keep you in the folder your located in when you change to root

arpi 06-11-2004 08:19 PM

thanks :)


All times are GMT -5. The time now is 03:44 AM.