Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-11-2004, 07:50 PM   #1
Registered: Dec 2003
Location: Maryland
Distribution: Fedora Core 1
Posts: 52

Rep: Reputation: 15
bash: su - changes directory to /root


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?

Old 06-11-2004, 08:14 PM   #2
Senior Member
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 59
use :
su -m
and that will keep you in the folder your located in when you change to root
1 members found this post helpful.
Old 06-11-2004, 08:19 PM   #3
Registered: Dec 2003
Location: Maryland
Distribution: Fedora Core 1
Posts: 52

Original Poster
Rep: Reputation: 15


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
BASH : Total directory size xgreen Programming 7 03-04-2013 05:33 AM
[bash] locating script's directory Erhnam Programming 19 02-01-2005 03:45 AM
bash: cd: My: No such file or directory Doug.Gentry Fedora 2 12-05-2004 02:53 PM
bash: ./configure: No such file or directory beerwulf Linux - Newbie 4 08-22-2004 03:50 AM
BASH: How to get current workin directory? gmitra Programming 9 09-20-2003 10:30 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:07 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration