Other *NIXThis forum is for the discussion of any UNIX platform that does not have its own forum. Examples would include HP-UX, IRIX, Darwin, Tru64 and OS X.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
why / is root and not root is /root/ as all classic's Unix path
/ is a directory and the root of the "root" file system. It normally should not contain any "normal" files, just subdirectories. It is the highest directory in the whole tree.
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:
The home dir of root is /root, not /home/root,
I imagine that could be changing and could be to be a type of deviant system with an alternate security system.
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.
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,489
Rep:
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
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.
You probably have an issue with permissions. Run ls -la /Your/Project/Directory/ and you'll see if the directory itself or some files don't have write permissions or are owned by some other user. You then can fix this chmod, chown or chgrp utilities respectively.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.