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 editNext edit →Content deleted Content addedVisualWikitext
Revision as of 18:37, 1 February 2022 editEragon Shadeslayer (talk | contribs)37 edits Subdirectories: Added description of linux's standard tool for creation and internationalization of default home directoriesTag: 2017 wikitext editor← Previous edit Revision as of 18:46, 1 February 2022 edit undoEragon Shadeslayer (talk | contribs)37 edits Default home directory per operating system: beautification (render file names / path als ''code'')Tag: 2017 wikitext editorNext edit →
Line 18: Line 18:
|- |-
|] |]
|{{angbr|root}}/usr/{{angbr|username}} |<code>{{angbr|root}}/usr/{{angbr|username}}
| rowspan="7" |] | rowspan="7" |]</code>
|- |-
|Unix-derived |Unix-derived
|/var/users/{{angbr|username}}<br/>/u01/{{angbr|username}}<br/>/usr/{{angbr|username}}<br/>/user/{{angbr|username}}<br/>/users/{{angbr|username}} |<code>/var/users/{{angbr|username}}<br/>/u01/{{angbr|username}}<br/>/usr/{{angbr|username}}<br/>/user/{{angbr|username}}<br/>/users/{{angbr|username}}</code>
|- |-
|Unix-based <ref>. Accessed on July 23, 2009</ref> |Unix-based <ref>. Accessed on July 23, 2009</ref>
|{{angbr|root}}/home/{{angbr|username}} |<code>{{angbr|root}}/home/{{angbr|username}}</code>
|- |-
|] / ] (]) |] / ] (])
|/home/{{angbr|username}} |<code>/home/{{angbr|username}}</code>
|- |-
|] / ] |] / ]
|/export/home/{{angbr|username}} |<code>/export/home/{{angbr|username}}</code>
|- |-
|] |]
|/Users/{{angbr|username}} |<code>/Users/{{angbr|username}}
|- |-
|] |]
|/data/media/{{angbr|userid}} |<code>/data/media/{{angbr|userid}}</code>
|- |-
|Microsoft Windows NT |Microsoft Windows NT
|{{angbr|root}}\WINNT\Profiles\{{angbr|username}} |<code>{{angbr|root}}\WINNT\Profiles\{{angbr|username}}
|rowspan=3|]<br/>]] |rowspan=3|]<br/>]]</code>
|- |-
|Microsoft Windows 2000, XP and 2003 |Microsoft Windows 2000, XP and 2003
|{{angbr|root}}\Documents and Settings\{{angbr|username}} |<code>{{angbr|root}}\Documents and Settings\{{angbr|username}}</code>
|- |-
|Microsoft Windows Vista, 7, 8, 10 and 11 |Microsoft Windows Vista, 7, 8, 10 and 11
|{{angbr|root}}\Users\{{angbr|username}} |<code>{{angbr|root}}\Users\{{angbr|username}}</code>
|- |-
|} |}
Line 54: Line 54:
The file {{code|/etc/xdg/user-dirs.defaults}} on many Linux systems defines the subdirectories created for users by default. 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 ], 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|url=https://www.linuxfromscratch.org/blfs/view/svn/general/xdg-user-dirs.html|access-date=2022-02-01|website=www.linuxfromscratch.org}}</ref> Creation is normally done with the first login by ], 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|url=https://www.linuxfromscratch.org/blfs/view/svn/general/xdg-user-dirs.html|access-date=2022-02-01|website=www.linuxfromscratch.org}}</ref>



==Other features per operating system== ==Other features per operating system==

Revision as of 18:46, 1 February 2022

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⟩ and Windows systems between 2000 and Server 2003 keep home directories in a folder called Documents and Settings.

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 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, 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 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 filesystem including other users home directories.

Benefits

Separating user data from system-wide data avoids redundancy and makes backups of important files relatively simple. 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.

Default home directory per operating system

Operating system Path Environment variable
AT&T Unix (original version) ⟨root⟩/usr/⟨username⟩ $HOME
Unix-derived /var/users/⟨username⟩
/u01/⟨username⟩
/usr/⟨username⟩
/user/⟨username⟩
/users/⟨username⟩
Unix-based ⟨root⟩/home/⟨username⟩
BSD / Linux (FHS) /home/⟨username⟩
SunOS / Solaris /export/home/⟨username⟩
macOS /Users/⟨username⟩
Android /data/media/⟨userid⟩
Microsoft Windows NT ⟨root⟩\WINNT\Profiles\⟨username⟩ %USERPROFILE%
%HOMEDRIVE%%HOMEPATH%
Microsoft Windows 2000, XP and 2003 ⟨root⟩\Documents and Settings\⟨username⟩
Microsoft Windows Vista, 7, 8, 10 and 11 ⟨root⟩\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 current working directory is automatically set to a user's home directory when they log in. The ~ (tilde character) shorthand command refers to that particular user's home directory.

The Unix superuser 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 /, 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.

Contrast with 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 contain 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, \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. "Home Directory Definition". Accessed on July 23, 2009
  2. "Xdg-user-dirs-0.17 – Beyond Linux From Scratch (System V Edition), Chapter 11. General Utilities". www.linuxfromscratch.org. Retrieved 2022-02-01.
Categories:
Home directory: Difference between revisions Add topic