Misplaced Pages

Home directory: Difference between revisions

Article snapshot taken from[REDACTED] with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 00:33, 7 April 2017 edit78.181.88.157 (talk) Contrast with single-user operating systems: grammar fix← Previous edit Latest revision as of 04:53, 15 June 2024 edit undoEmunah00 (talk | contribs)215 editsNo edit summary 
(36 intermediate revisions by 30 users not shown)
Line 1: Line 1:
{{Short description|Directory to hold files for a specific user}}
{{Refimprove|date=July 2009}} {{More citations needed|date=July 2009}}
A '''home directory''' is a ] on a ] ] containing ] for a given ] of the system. The specifics of the home directory (such as its name and location) are defined by the operating system involved; for example, ] systems between ] and ] keep home directories in a folder called ''Documents and Settings''. A '''home directory''' is a ] on a ] ] containing ] for a given ] of the system. The specifics of the home directory (such as its name and location) are defined by the operating system involved; for example, ] / ] (]) systems use <code>/home/{{angbr|username}}</code> or <code>/usr/home/{{angbr|username}}</code> and ] systems since ] use <code>\Users\{{angbr|username}}</code>.<ref name="hdtable">{{cite web |title=Where is my user home directory? |url=https://help.dugeo.com/m/faq/l/245652-where-is-my-user-home-directory |website=DownUnder GeoSolutions |access-date=22 February 2024}}</ref>


==Description== ==Description==
A user's home directory is intended to contain that user's files; including text documents, music, pictures or videos, etc. It may also include their ]s of preferred settings for any software they have used there and might have tailored to their liking: ] ], favorite ] ] and ], ]s to any external services accessed via a given software, etc. The user can install executable software in this directory, but it will only be available to users with permission to this directory. The home directory can be organized further with the use of sub-directories. A user's home directory is intended to contain that user's files; including text documents, music, pictures, videos, etc.<ref>{{Cite web |date=2023-05-15 |title=What is a Home Directory? – TecAdmin |url=https://tecadmin.net/what-is-a-home-directory/ |access-date=2023-09-23 |language=en-US}}</ref> It may also include their ]s of preferred settings for any software they have used there and might have tailored to their liking: ] ], favorite ] ] and ], stored ]s to any external services accessed via a given software, etc. The user can install executable software in this directory, but it will only be available to users with permission to execute files in this directory. The home directory can be organized further with the use of sub-directories.


The content of a user's home directory is protected by ], and by default is accessible to all authenticated users and administrators. Any other user that has been granted administrator privileges has authority to access any protected location on the ] including other users home directories. The content of a user's home directory is protected by ], and by default is accessible to all authenticated users and administrators.<ref>{{cite web |last1=Brown |first1=Paul |title=Classic SysAdmin: The Linux Filesystem Explained |url=https://www.linuxfoundation.org/blog/blog/classic-sysadmin-the-linux-filesystem-explained |website=The Linux Foundation |publisher=The Linux Foundation |access-date=8 December 2023}}</ref> Any other user that has been granted administrator privileges has authority to access any protected location on the ] including other users' home directories.


==Benefits== ==Benefits==
Separating user data from system-wide data avoids redundancy (the same system files can be used by between different users) and makes backups of files that are important for a specific user simpler.
Separating user data from system-wide data avoids redundancy and makes backups of important files relatively simple. Furthermore, ]s, ]es and ]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 ]s.{{Citation needed|date=July 2009}}


Furthermore, ], ], and ] 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 ]s, reducing the chances of harming the functioning of the operating system.<ref>{{cite book |last1=Shimeall |first1=Timothy J. |last2=Spring |first2=Jonathan M. |title=Introduction to information security: a strategic-based approach |date=2014 |publisher=Syngress, an imprint of Elsevier |location=Amsterdam Heidelberg |isbn=978-1-59749-969-9 |edition=First}}</ref>
==Default home directory per operating system==


==Default home directory per operating system==
{| class="wikitable" {| class="wikitable"
!] !colspan=2|]
!] !]
!] !]
|- |-
|colspan=2|]
|Microsoft Windows NT
|<root>\WINNT\Profiles\<username> |<code>/usr/{{angbr|username}}</code>
|rowspan=3|%Homedrive%%Homepath% | rowspan="7" |<code>]</code>
|- |-
|colspan=2|Unix-derived
|Microsoft Windows 2000, XP and 2003
|<code>/var/users/{{angbr|username}}</code><br><code>/u01/{{angbr|username}}</code><br><code>/usr/{{angbr|username}}</code><br><code>/user/{{angbr|username}}</code><br><code>/users/{{angbr|username}}</code>
|<root>\Documents and Settings\<username>
|- |-
|colspan=2|Unix-based <ref>. Accessed on July 23, 2009</ref>
|Microsoft Windows Vista, 7, 8 and 10
|<root>\Users\<username> |<code>/home/{{angbr|username}}</code>
|- |-
|colspan=2|] / ] (])
|Unix-based <ref>. Accessed on July 23, 2009</ref>
|<root>/home/<username> |<code>/home/{{angbr|username}}</code> or <code>/usr/home/{{angbr|username}}</code>
|rowspan=6|$HOME
|- |-
|colspan=2|] / ]
|Unix-derived
|<code>/export/home/{{angbr|username}}</code>
|/var/users/<username><br/>/u01/<username><br/>/usr/<username><br/>/user/<username><br/>/users/<username>
|- |-
|colspan=2|]
|] / ]
|/export/home/<username> |<code>/Users/{{angbr|username}}</code>
|- |-
|colspan=2|]
|] / ] (])
|<code>/data/media/{{angbr|userid}}</code>
|/home/<username>
|- |-
|rowspan=3|]
|]
|NT
|<root>/usr/<username>
|<code>\WINNT\Profiles\{{angbr|username}}</code>
|rowspan=3|<code>]</code><br><code>{{nowrap|]]}}</code>
|- |-
|2000<br>XP<br>2003
|]
|<code>\Documents and Settings\{{angbr|username}}</code>
|/Users/<username>
|- |-
|Vista<br>7<br>8<br>10<br>11
|]
|<device>: |<code>\Users\{{angbr|username}}</code>
|SYS$LOGIN
|- |-
|}<ref name="hdtable"/><!-- I'm not sure how to add a source to an entire wikitable so this will do -->
|]

|/data/media/<userid>
===Subdirectories===
|
The file {{code|/etc/xdg/user-dirs.defaults}} on many Linux systems defines the subdirectories created for users by default. Creation is normally done with the first login by Xdg-user-dirs, a tool to help manage "well known" user directories like ''desktop'', ''downloads'', ''documents'', ''pictures'', ''videos'', or ''music''. The tool is also capable of ] of the folders' names.<ref>{{cite web |title=Xdg-user-dirs-0.17 – Beyond Linux From Scratch (System V Edition), Chapter 11. General Utilities |website=linuxfromscratch.org |url=https://www.linuxfromscratch.org/blfs/view/svn/general/xdg-user-dirs.html |access-date=2022-02-01}}</ref>
|}

==Other features, per operating system==


==Other features per operating system==
===Unix=== ===Unix===
In Unix, a user will be automatically placed into their home directory upon ]. The <tt>~user</tt> shorthand variable refers to a user's home directory (allowing the user to navigate to it from anywhere else in the filesystem, or use it in other Unix commands). The <tt>~</tt> (] character) shorthand command refers to that particular user's home directory. In Unix, the ] is automatically set to a user's home directory when they ]. In many built-in commands, typing the {{code|~}} (]) character is equivalent to specifying the current user's home directory.


The Unix ] has access to all directories on the filesystem, and hence can access home directories of all users. The superuser's home directory on older systems was <tt>]</tt>, but on many newer systems it is located at <tt>]</tt> (Linux, BSD), or <tt>]/root</tt> (]). The Unix ] has access to all directories on the file system, and hence can access home directories of all users. The superuser's home directory on older systems was {{mono|]}}, but on many newer systems it is located at {{mono|]}} (Linux, BSD), or {{mono|]/root}} (]).


===VMS=== ===VMS===
In the ] 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".{{Citation needed|date=July 2009}} In the ] 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''.<ref>{{cite web |title=OpenVMS User's Manual |url=http://odl.sysworks.biz/disk$axpdocjun011/opsys/vmsos73/vmsos73/6489/6489pro_010.html |website=odl.sysworks.biz |access-date=8 December 2023}}</ref><ref>{{cite web |title=Master file directory - VSI OpenVMS Wiki |url=https://wiki.vmssoftware.com/Master_file_directory |website=wiki.vmssoftware.com |access-date=8 December 2023}}</ref>


==Contrast with single-user operating systems== ==Single-user operating systems==
Single-user operating systems simply have a single directory or ] for all user files, there is no individual directory setup per user (though users can still setup and maintain directories inside this main working directory manually). Single-user operating systems simply have a single directory or ] for all user files, there is no individual directory setup per user (though users can still setup and maintain directories inside this main working directory manually).
* ] versions 2 and up have "System" and "Work" partitions on hard disks by default. * ] versions 2 and up have "System" and "Work" partitions on hard disks by default.
* ] (and its successors) have a /home directory which contain the files belonging to the single user of the system. * ] (and its successors) have a /home directory which contains the files belonging to the single user of the system.
* Versions of Windows prior ] OEM Service Release 2 did not have a user folder, but since that release, <tt>\]</tt> became in effect the single user's home directory. * Versions of Windows prior ] OEM Service Release 2 did not have a user folder but, since that release, {{mono|C:\]}} became in-effect the single user's home directory.
* ] and ] in a single user, non-networked setup, <tt>/me</tt> is used, as well as <tt>/root</tt> when logged in as superuser. * ] and ] in a single-user, non-networked setup, {{code|/me}} is used, as well as {{code|/root}} when logged in as superuser.


==See also== ==See also==
*]
*] *]
*] *]
*]
*] *]
*] *]


==References== ==References==
{{Reflist}}
<references/>


{{DEFAULTSORT:Home Directory}}
] ]
] ]

Latest revision as of 04:53, 15 June 2024

Directory to hold files for a specific user
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Home directory" – news · newspapers · books · scholar · JSTOR (July 2009) (Learn how and when to remove this message)

A home directory is a file system directory on a multi-user operating system containing files for a given user of the system. The specifics of the home directory (such as its name and location) are defined by the operating system involved; for example, Linux / BSD (FHS) systems use /home/⟨username⟩ or /usr/home/⟨username⟩ and Windows systems since Windows Vista use \Users\⟨username⟩.

Description

A user's home directory is intended to contain that user's files; including text documents, music, pictures, videos, etc. It may also include their configuration files of preferred settings for any software they have used there and might have tailored to their liking: web browser bookmarks, favorite desktop wallpaper and themes, stored passwords to any external services accessed via a given software, etc. The user can install executable software in this directory, but it will only be available to users with permission to execute files in this directory. The home directory can be organized further with the use of sub-directories.

The content of a user's home directory is protected by file-system permissions, and by default is accessible to all authenticated users and administrators. Any other user that has been granted administrator privileges has authority to access any protected location on the file system including other users' home directories.

Benefits

Separating user data from system-wide data avoids redundancy (the same system files can be used by between different users) and makes backups of files that are important for a specific user simpler.

Furthermore, 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, reducing the chances of harming the functioning of the operating system.

Default home directory per operating system

Operating system Path Environment variable
AT&T Unix (original version) /usr/⟨username⟩ $HOME
Unix-derived /var/users/⟨username⟩
/u01/⟨username⟩
/usr/⟨username⟩
/user/⟨username⟩
/users/⟨username⟩
Unix-based /home/⟨username⟩
BSD / Linux (FHS) /home/⟨username⟩ or /usr/home/⟨username⟩
SunOS / Solaris /export/home/⟨username⟩
macOS /Users/⟨username⟩
Android /data/media/⟨userid⟩
Microsoft Windows NT \WINNT\Profiles\⟨username⟩ %USERPROFILE%
%HOMEDRIVE%%HOMEPATH%
2000
XP
2003
\Documents and Settings\⟨username⟩
Vista
7
8
10
11
\Users\⟨username⟩

Subdirectories

The file /etc/xdg/user-dirs.defaults on many Linux systems defines the subdirectories created for users by default. Creation is normally done with the first login by Xdg-user-dirs, a tool to help manage "well known" user directories like desktop, downloads, documents, pictures, videos, or music. The tool is also capable of localization (i.e. translation) of the folders' names.

Other features, per operating system

Unix

In Unix, the working directory is automatically set to a user's home directory when they log in. In many built-in commands, typing the ~ (tilde) character is equivalent to specifying the current user's home directory.

The Unix superuser has access to all directories on the file system, and hence can access home directories of all users. The superuser's home directory on older systems was /, but on many newer systems it is located at /root (Linux, BSD), or /var/root (Mac OS X).

VMS

In the OpenVMS 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.

Single-user operating systems

Single-user operating systems simply have a single directory or partition for all user files, there is no individual directory setup per user (though users can still setup and maintain directories inside this main working directory manually).

  • AmigaOS versions 2 and up have "System" and "Work" partitions on hard disks by default.
  • BeOS (and its successors) have a /home directory which contains the files belonging to the single user of the system.
  • Versions of Windows prior Windows 95 OEM Service Release 2 did not have a user folder but, since that release, C:\My Documents became in-effect the single user's home directory.
  • NeXTSTEP and OPENSTEP in a single-user, non-networked setup, /me is used, as well as /root when logged in as superuser.

See also

References

  1. ^ "Where is my user home directory?". DownUnder GeoSolutions. Retrieved 22 February 2024.
  2. "What is a Home Directory? – TecAdmin". 2023-05-15. Retrieved 2023-09-23.
  3. Brown, Paul. "Classic SysAdmin: The Linux Filesystem Explained". The Linux Foundation. The Linux Foundation. Retrieved 8 December 2023.
  4. Shimeall, Timothy J.; Spring, Jonathan M. (2014). Introduction to information security: a strategic-based approach (First ed.). Amsterdam Heidelberg: Syngress, an imprint of Elsevier. ISBN 978-1-59749-969-9.
  5. "Home Directory Definition". Accessed on July 23, 2009
  6. "Xdg-user-dirs-0.17 – Beyond Linux From Scratch (System V Edition), Chapter 11. General Utilities". linuxfromscratch.org. Retrieved 2022-02-01.
  7. "OpenVMS User's Manual". odl.sysworks.biz. Retrieved 8 December 2023.
  8. "Master file directory - VSI OpenVMS Wiki". wiki.vmssoftware.com. Retrieved 8 December 2023.
Categories:
Home directory: Difference between revisions Add topic