Question:
Where the Root's Home Directory? Unix/Linux?
Michael Jackson
2009-07-13 11:15:45 UTC
1. As far as i know, when you are a root, the root directory (/) is the home directory. Right? Ok, so if the root in his home directory does rm -r * everything is gone. So does look like this: /homeroot/home/user1?

2. What about the user? /home/user1
If user 1 does rm -r *, everything in his account is gone! but don't user1 uses some shared resources? where this shared resources go?
Four answers:
praneeth
2009-07-13 11:33:14 UTC
1. As far as my knowledge is concerned, most of the times, the root's home directory is '/root' and not '/' itself.



2. User1's home directory would be /home/user1 and if he does rm -rf * then he will be deleting the files and directories in his folder. Shared resources i think are usually located in the / folder and that cannot be deleted by the user1.



and thinking about another scenario where a root changes to / folder and does a rm -rf *, I really doubt if he can do that.. ( personally I never did that so not sure.. :D ) because a lot of files will be in use at that time.
anonymous
2015-08-13 08:04:54 UTC
This Site Might Help You.



RE:

Where the Root's Home Directory? Unix/Linux?

1. As far as i know, when you are a root, the root directory (/) is the home directory. Right? Ok, so if the root in his home directory does rm -r * everything is gone. So does look like this: /homeroot/home/user1?



2. What about the user? /home/user1

If user 1 does rm -r *, everything in his...
Sheryl
2016-03-18 04:55:57 UTC
What people call "the root directory" is the top-level directory or / That's right. A slash, nothing after it. Everything lives under the root directory. This is now to be confused with root's home directory, which is /root
anonymous
2009-07-13 11:28:34 UTC
The user root doesn't really have a "home" directory, unless you count /root.

/ is just the root of your filesystem at the time, and if you're logged in as root, the smartest place to start out is at / because you can go anywhere.



the information stored in /home/user is all config settings for the user. Unless they installed things in their home folders(stupid) then deleting the folder won't affect any other users. It's the same as deleting the documents folder of a user on a windows system.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...