010-100 · Question #30
Which of the following is the home folder for the root user?
The correct answer is C. /root. In Linux, the root user's home directory is '/root', a dedicated directory separate from the '/home' directory used by regular users.
Question
Which of the following is the home folder for the root user?
Options
- A/user/root
- B/
- C/root
- D/home/root
How the community answered
(52 responses)- A6% (3)
- B4% (2)
- C77% (40)
- D13% (7)
Why each option
In Linux, the root user's home directory is '/root', a dedicated directory separate from the '/home' directory used by regular users.
'/user/root' is not a valid standard Linux path; no such directory exists by default in any Linux filesystem hierarchy.
'/' is the root of the entire filesystem, not a home directory for any user account.
The root account is the superuser in Linux and by convention its home directory is '/root', not under '/home' like standard user accounts. This separation ensures the superuser's files are stored in a distinct, privileged location. The '/root' path is defined in the '/etc/passwd' file as the home directory for the root account.
'/home/root' follows the convention for regular user home directories but is not the actual home directory for the root user in standard Linux distributions.
Concept tested: Linux root user home directory location
Source: https://www.pathname.com/fhs/pub/fhs-2.3.html#ROOTHOMEDIR
Topics
Community Discussion
No community discussion yet for this question.