root
Hello,
why / is root and not root is /root/ as all classic's Unix path this representation is less hierarcical, no ? |
Not sure what you mean. The root user's home directory is always "/root". I have heard the term "root directory" or "root of the drive" which meant "/" but that's just a term.
|
yes this is the structure admise on all unix/linux. But could be proc/ tmp/ sys/ usr/ home/root/ home/user root/ (as /) ...
|
destitute root by moving / of the top
|
I feel the followup helps no better in clarifying the question.
Well, the formal documentation for the Linux file system is here: https://www.tldp.org/LDP/Linux-Files...tml/index.html |
Quote:
The / dir of other filesystems becomes associated with its mount dir within the root fs. root is the USER name (with ID 0) which owns that directory (and most of the system below it, like /etc /usr /*bin and /lib*). To keep that user's HOME directory from residing in a mountable fs the convention has become to put those (profile) files into a /root subdir ON the root fs. This hasn't always been so and it IS just a convention. |
can you explain it a bit better? I do not really understand what do you mean?
The home dir of root is /root, not /home/root, because usually /home is mounted, but the home dir of root should be available without mounting anything. I do not know how is it related to proc, tmp, sys or other dirs. |
Why would you need /root/ as a root for all paths? It would simply be expensive, especially if taking into account the 255 symbols limit for path length. As you can ntc, othr dir nms r prtty concs as wl.
|
To simplify administration (defaults permissions simplified) and justify that "all is file in Unix" : / cannot represent a file because He is top, /root talking himself, mkdir / is just impossible, mkdir /root is.
Quote:
|
You can set permissions on / as well. And if you make the root a file, what will be the top directory then? should other files become rootless, like CON/AUX/COM* in DOS/Windows? Top and root are actually synonymous, I don't get why do you try to distinguish them. Even the probably purest UNIX-like system, Plan 9, does have / as a root directory, and does not drop the concept of directories.
|
Let me try, the symbol / is the base of your operating system. the usual O/S contains first level main directories, /bin /sbin /etc /var, needed to have an actual system to work, in these are all the absolute necessary parts of an O/S, these are used by the admin user, root.
Then we have the secondary level of directories, /usr/bin /usr/sbin /opt, etc, which can be used by a user, as well as the root user. You can operate a system without the secondary level directories, but not without the first level directories. This, of course, is a simplification of the hierarchy in use. |
Others have explained and I won't say anything materially different, just use different words and maybe that will help you.
To Linux, everything is a file, period. Files are 'placed' somewhere. These are called directories. The directories, together, are organized as a tree; actually as an upside down tree. Following the tree analogy the starting point for the directory tree is called the root. It is given the symbol (and recognized by the system) /. This is simply the starting point of the tree. To tell the system where to find a file (the path) you always have to tell it the starting point and then the series of branches, or directories, to traverse to find the file. That starting point is always either / (the root) or the current directory. A path of /x/y/z starts at the root, looks in directory x for directory y, in directory y for directory or file z. A path of x/y/z starts not at the root but in the current directory, and then on as before, x being in the current directory. Every user on the system has a home directory for their personal stuff that other users are normally limited in their access to. Root is a user just with super powers. But like all users root has a home directory. The standard for Linux is for all normal users' home directories to be in the 'home' directory which is a subdirectory of / (which has nothing to do with the user root). However, because the user root is special and should be kept separate s/he is given a special directory called 'root', a subdirectory of / but performing the same functions, though with special powers and permissions as other home directories. Another way of looking at it is that / belongs to the system, not any individual. /root belongs to a super user called root and other users have very limited, if any, access to that user's directory. The fact that the term root is used in two different ways is unfortunate, perhaps, but that is the English language for you. Again, follow the tree analogy: / is the root, base, origin of the tree; /root is a branch off that base or origin. |
I have an issue regarding the superuser.
Is there a way to provide a direct grant to root as superuser other than just go to sudo su again and again? Since in my new project the folder has some kind of lock I am facing and hence I am not able to delete any files internally. |
would be nice to open a new thread instead of hiding another (and different) one.
Also would be nice to explain exactly what did you try and what happened. Theoretically root has right to do anything, there is no way to grant more |
Quote:
|
All times are GMT -5. The time now is 03:02 AM. |