World Library  
Flag as Inappropriate
Email this Article

Root directory

Article Id: WHEBN0000158871
Reproduction Date:

Title: Root directory  
Author: World Heritage Encyclopedia
Language: English
Subject: File system, Working directory, IBMDOS.COM, Fully qualified name, AUTOEXEC.BAT
Collection: File System Directories
Publisher: World Heritage Encyclopedia

Root directory

In a computer file system, and primarily used in the Unix and Unix-like operating systems, the root directory is the first or top-most directory in a hierarchy. It can be likened to the trunk of a tree, as the starting point where all branches originate from. The root file system is the file system contained on the same disk partition on which the root directory is located; it is the filesystem on top of which all other file systems are mounted as the system boots up.


  • Metaphor 1
  • Multiple root directories 2
  • Related uses 3
  • See also 4
  • References 5
  • External links 6


To use the example of a physical file cabinet, if the separate drawers in the file cabinet are represented as the highest level of sub-directories in the file system or system prompt, then the room the file cabinet is in may be represented as the root directory. That is, the other directories may be inside it, but the root directory cannot go in any other directories, at least in that file system. In most operating systems, files can be placed inside the root directory, as well as in its sub-directories. One may envision this as placing paper files anywhere in the room, or into any file cabinet within the room.

Multiple root directories

Unix abstracts the nature of this tree hierarchy entirely and in Unix and Unix-like systems the root directory is denoted by the / (slash) sign. Though the root directory is conventionally referred to as /, the directory entry itself has no name – its name is the "empty" part before the initial directory separator character (/). All filesystem entries, including mounted filesystems are "branches" of this root.

Under DOS, OS/2, and Microsoft Windows, each partition has a drive letter assignment (labeled C:\ for a particular partition C) and there is no common root directory above that. DOS, OS/2, and Windows do support more abstract hierarchies, with partitions mountable within a directory of another drive, though this is rarely seen. This has been possible in DOS through the command JOIN since it first was added to DOS, and can be achieved in all Windows versions as well. In some contexts, it is also possible to refer to a root directory containing all mounted drives, although it cannot contain files directly as it does not exist on any file system. For instance, when linking to a local file using the "file:" URI scheme, the syntax is of the form "file:///C:/...", where "file://" is the standard prefix, and the third '/' represents the root of the local system.

In UNIX-like operating systems, each process has its own idea of what the root directory is. For most processes this is the same as the system's actual root directory, but it can be changed by calling the chroot system call. This is typically done to create secluded environment to run software that requires legacy libraries and sometimes to simplify software installation and debugging. Chroot is not meant to be used for enhanced security as the processes inside can break out.[1] FreeBSD offers a stronger jail() system call that enables operating-system-level virtualization and also serves security purposes to restrict which files a process may access to just a subset of the file system hierarchy.

Related uses

On many Unixes, there is also a directory named /root. Confusingly, it is not a root directory in the sense of this article, but rather the home directory of the superuser (conventionally known as "root"). It is sometimes referred to as "slash root".[2]
In the VMS operating system, the term "root directory" is used to refer to the directory in which all the user's files are stored, which is what Unix calls the "home directory". The equivalent of a MS-DOS per-disk "root directory" in VMS is referred to as a "Master File Directory" and is specified as [000000]

See also


  1. ^ "What chroot() is really for". Retrieved 2014-02-12. 
  2. ^ root Definition. The Linux Information Project.

External links

  • Root Directory Definition - by The Linux Information Project (LINFO)
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.