In Linux, why isn't superuser root's folder under /home?
You can create a user that has privileges like root
, and it's home directory will fall under /home/username
. Why does root
get its own folder at the top level of the file system? Is this just convention, a security concern, or is there a performance-related reason?
One reason: On many systems, /home
is on a separate partition (or network share) that might fail to mount and it is a good idea to allow root
to login with his usual environment whenever possible.
root's home should be on the partition that the operating system resides on, which by definition is /, so that you can still login as root without issues if, say, another disk partitions are unavailable. /home is sometimes mounted on a separate partition or a separate drive. If this contains the root homedir and is offline, you may encounter difficulties with your login shell. Not a good idea if you're trying to fix things as the root user.