where have my files under 'root' gone (Solved)
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
where have my files under 'root' gone (Solved)
hi please excuse me if this is a silly question can anyone tell me where my files have gone under 'root' ..? under 'home' and under 'root' are showing same files as can be seen from this screenshot any pointers as to my ignorance would be a help with thans for your time and I suspect patience...
file:///home/david/Pictures/Screenshot%20from%202013-07-06%2016:54:11.png
file:///home/david/Pictures/Screenshot%20from%202013-07-06%2016:54:11.png
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: where have my files under 'root' gone
Something went wrong; you didn't include a screenshot, just the name of the file on your computer?
Re: where have my files under 'root' gone
xenopeek wrote:Something went wrong; you didn't include a screenshot, just the name of the file on your computer?
hi sorry cant get screenshot to work on this ...Screenshot from 2013-07-06 16:54:11.png is an invalid filename. keeps coming up
Re: where have my files under 'root' gone
Try uploading it to a image file hoster, such as http://imgur.com/, and sharing the link there.
Re: where have my files under 'root' gone
xenopeek wrote:Try uploading it to a image file hoster, such as http://imgur.com/, and sharing the link there.
hope this helps [img]http://i.imgur.com/TOkRKmC.png?3[/img]
Re: where have my files under 'root' gone
That's because the home variable changes when you become root. By default under a regular account it sets it to /home/$USER but when you change to root it becomes /. The home variable is what tells linux where your home directory is, so when you open terminal your greeted with your own directory.
If you want to get back to your home directory from a root account, just type.
Sprint GS3 Running TN's Msg and Chubbs
If you want to get back to your home directory from a root account, just type
Code: Select all
cd /home/yourusername
Sprint GS3 Running TN's Msg and Chubbs
Re: where have my files under 'root' gone
To see a list of all your local variables, type "set" in terminal.
Sprint GS3 Running TN's Msg and Chubbs
Sprint GS3 Running TN's Msg and Chubbs
Re: where have my files under 'root' gone
man I am so confused ... why does linux make it soo hard to follow ...or am I just stupid... ...?gollum17 wrote:To see a list of all your local variables, type "set" in terminal.
Sprint GS3 Running TN's Msg and Chubbs
Re: where have my files under 'root' gone
What actually happened in your screenshot:
- You were in your own home directory, and showed its contents
- You ran `sudo su`, which changes only which user you are
- You were still in your own home directory, and not in root's because you haven't changed to that, and showed its contents
That is all as expected. You just changed which user you are, and nothing else.
As per the manpage of su, use `sudo su -` (a minus sign as a parameter at the end) to get what you want: changing the user and also changing to its home directory.
Of course, this is rather redundant as the above can just be done with `sudo -i`; no su needed. Linux doesn't make this difficult, its all documented right there in the manpages
- You were in your own home directory, and showed its contents
- You ran `sudo su`, which changes only which user you are
- You were still in your own home directory, and not in root's because you haven't changed to that, and showed its contents
That is all as expected. You just changed which user you are, and nothing else.
As per the manpage of su, use `sudo su -` (a minus sign as a parameter at the end) to get what you want: changing the user and also changing to its home directory.
Code: Select all
OPTIONS
The options which apply to the su command are:
-, -l, --login
Provide an environment similar to what the user would expect had
the user logged in directly.
.
Re: where have my files under 'root' gone
xenopeek wrote:What actually happened in your screenshot:
- You were in your own home directory, and showed its contents
- You ran `sudo su`, which changes only which user you are
- You were still in your own home directory, and not in root's because you haven't changed to that, and showed its contents
That is all as expected. You just changed which user you are, and nothing else.
As per the manpage of su, use `sudo su -` (a minus sign as a parameter at the end) to get what you want: changing the user and also changing to its home directory.Of course, this is rather redundant as the above can just be done with `sudo -i`; no su needed. Linux doesn't make this difficult, its all documented right there in the manpagesCode: Select all
OPTIONS The options which apply to the su command are: -, -l, --login Provide an environment similar to what the user would expect had the user logged in directly. .
ok thank you its a virtual 'root' so to speak ... does this mean that I cannot access my 'real' root on my machine i have seen that nearly all recommend staying clear of 'root' as much as possible as a precaution against the user damaging his OS for good...