This is an old revision of this page, as edited by AlistairMcMillan (talk | contribs) at 12:21, 18 October 2004 (Make NT link direct). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Revision as of 12:21, 18 October 2004 by AlistairMcMillan (talk | contribs) (Make NT link direct)(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)On Unix systems, a home directory (sometimes called a home folder) is a path on the local file system where a user's personal files are stored. Typically this includes configuration files (usually hidden, i.e. starting with a "."), documents, locally installed programs etc. The home directory is defined in the file /etc/passwd as part of a user's login information. On many systems - including most distributions of Linux and variants of BSD (e.g. OpenBSD), the home directory for each user takes the form /home/<username> (where <username> is the name of the user account). The home directory of the superuser account (usually named root), however, is often located at /root.
This convention is not universal, however: in NeXTSTEP, OPENSTEP, and Mac OS X, users' home directories are stored in /Users/<username>. However in NeXTSTEP and OPENSTEP in a single user, non-networked setup, there is a restricted me account in tandem with the standard unrestricted root account, which stores its users' files in /me. In Solaris, home directories are stored in /home, but this is in fact merely the mount point for the filesystem at /export/home.
An additional naming convention is that ~user can be used as shorthand for referring to the home directory belonging to user, whatever its location on the filesystem. This is why many web servers are configured to show a user's personal website when a URL such as http://www.catb.org/~esr/ is accessed (in this example, the username is esr). A further shorthand allows a user to refer to their own home directory simply as ~.
Separating user data from system-wide data avoids redundancy and makes backups of important files relatively simple. On the other hand, Trojan horses, viruses and worms running under the user's name and with their privileges will in most cases only be able to alter the files in the user's home directory, and perhaps some files belonging to workgroups the user is a part of, but not actual system files.
In newer versions of Microsoft Windows, based on the multi-user Windows NT, each user has a home directory which by default is located at C:\Documents and Settings\<username>. (With <username> again replaced by the particular user's login name).