Home directory
274144
226018628
2008-07-16T13:43:07Z
CarsracBot
6929011
robot Adding: [[ja:ホームディレクトリ]]
{{Unreferenced|date=May 2008}}
In computing, a '''home directory''' is a [[directory (file systems)|directory]] which contains the personal [[Computer file|files]] of a particular [[User (computing)|user]] of the system.
Separating user data from system-wide data avoids redundancy and makes backups of important files relatively simple. Furthermore, [[Trojan horse (computing)|Trojan horse]]s, [[computer virus|virus]]es and [[computer worm|worm]]s 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.
==Implementations==
On [[Unix]] and [[Unix-like]] systems, a user's home directory contains all that user's documents and other personal data, including his [[configuration file]]s of preferred settings for any software he has used there and might have tailored to his liking: [[web browser]] [[Internet bookmark|bookmarks]], favorite [[Desktop metaphor|desktop]] [[Computer wallpaper|wallpaper]] and [[Theme (computing)|themes]], [[password]]s to any external services accessed via a given software, and so on. The user can also keep additional software which may not have been installed on the system as a whole. This directory will usually be organized with the use of sub-folders, at the user's preference.
The content of one's user home directory is private and can be made unavailable to other users of the system (local or remote), protected by a mechanism of [[file system permissions]]. Note however that anyone who has been granted ''[[superuser]]'' privilege, such as the system administrator, has authority to access any protected location on the [[filesystem]].
The home directory is defined as part of the user's account data (for instance on Unix in the <tt>[[/etc]]/passwd</tt> file). It is where a user's [[Working directory|focus]] is located upon [[Logging (computer security)|login]] in a [[Shell (computing)|shell]] (as visible at the [[Command line interface]] prompt or via the "''[[pwd]]''" command).
The name of the home directory depends on the operating system, but there appears to be some convergence in recent years. In all cases "name" is the users name or id.
* <tt>/home/name</tt> - most distributions of [[Linux]], most variants of [[BSD]] (e.g. [[OpenBSD]]), and [[Solaris (operating system)|Solaris]]
* <tt>/Users/name</tt> - [[Windows Vista]], [[NeXTSTEP]], [[OPENSTEP]], [[Mac OS X]], [[GoboLinux]]
* <tt>\WINNT\Profiles\name</tt> - [[Windows NT]] systems released in the 1990s (that is, prior to Windows 2000)
* <tt>\Documents and Settings\name</tt> - [[Windows 2000]], [[Windows XP]] and [[Windows Server 2003]]
* <tt>/var/users/name</tt>, <tt>/u01/name</tt>, <tt>/usr/name</tt>, <tt>/user/name</tt>, <tt>/users/name</tt> - various Unix-derived systems
* <tt>/usr/name</tt> - original versions of AT&T Unix
On Windows the directories are always on the system drive, typically [[Drive letter assignment|C:]], so many of the above names can be prefixed with <tt>C:</tt> to make them not depend on the current drive. Conversely, not specifying the drive will allow the system drive to be different (perhaps D:). In addition, before [[Windows Vista]], the name of the directory was localized into the language of the installed system. Thus the most reliable way to find the home directory was to expand the [[Environment variable|shell expansion]] <tt>%UserProfile%</tt> (and use relative naming from there to find other users).
On Unix-derived systems the home directory of the [[superuser]] does not follow the naming conventions of other users. Traditionally it was <tt>[[root directory|/]]</tt>, but on many newer systems it is located at <tt>[[/root]]</tt> (Linux, BSD), or <tt>[[/var]]/root</tt> ([[Mac OS X]]). The easiest way to find a home directory is to expand the [[Environment variable]] <tt>$HOME</tt> and use relative naming from there, but the official method is to parse the data out of the file <tt>/etc/passwd</tt>.
Single-user operating systems (which may be used by more than one person, but which are called "single-user" because they do not differentiate between different owners' files) typically do not have home directories, though they may have separate disks or [[Disk partitioning|partitions]] which may or may not be used for this purpose. For example, [[AmigaOS]] versions 2 and up have "System" and "Work" partitions on hard disks by default. The [[BeOS]] (and its successors) have a /home directory which contain the files belonging to the single user of the system. Early versions of Windows did not have the user name, and thus <tt>/MyDocuments</tt> was in effect the single users home directory. In [[NeXTSTEP]] and [[OPENSTEP]] in a single user, non-networked setup, <tt>/me</tt> is used, as well as <tt>/root</tt> when logged in as superuser.
An additional Unix naming convention (originating from the [[C shell|csh]] shell) is that <tt>~user</tt> can be used as shorthand for referring to the home directory belonging to <tt>user</tt>, whatever its location on the filesystem. This is why many [[web server]]s are configured to show a user's personal [[website]] when a [[Uniform Resource Locator|URL]] such as http://www.catb.org/~esr/ is accessed (in this example, the username is <tt>esr</tt>). A further shorthand allows a user to refer to his ''own'' home directory simply as <tt>~</tt> (the [[Tilde#Directories and URLs|tilde]] character).
In the [[VMS]] operating system, a user's home directory is called the "root directory", and the equivalent of a Unix/DOS/Windows/AmigaOS "root directory" is referred to as the "Master File Directory".
==See also==
*[[Filesystem hierarchy standard]]
*[[My Documents]]
*[[Root directory]]
*[[Working directory]]
*[[Parent directory]]
[[Category:Computer file systems]]
[[bs:Home direktorij]]
[[de:Benutzerverzeichnis]]
[[es:~/]]
[[hr:Home direktorij]]
[[it:Home directory]]
[[nl:Homedirectory]]
[[ja:ホームディレクトリ]]
[[pl:Katalog domowy]]
[[simple:Home directory]]