Root directory
Encyclopedia
In computer
file system
s, the root directory is the first or top-most directory
in a hierarchy. It can be likened to the root of a tree
— the starting point where all branches originate.
s, files
can be placed inside the root directory, as well in its sub-directories. One may envision this as placing paper files anywhere in the room, or into any file cabinet within the room.
and Unix-like
systems, the root directory is denoted
ed partitions are "branches" of this root.
Under DOS
and Microsoft Windows
, each partition has a drive letter assignment
(labeled
, the syntax is of the form "
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 for security purposes to restrict which files a process may access to just a subset of the file hierarchy.
es, there is also a directory which is 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").
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 MSDOS per-disk "root directory" in VMS is referred to as a "Master File Directory" and is specified as [000000]
Computing
Computing is usually defined as the activity of using and improving computer hardware and software. It is the computer-specific part of information technology...
file system
File system
A file system is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device which contain it. A file system organizes data in an efficient manner and is tuned to the...
s, the root directory is the first or top-most directory
Directory (file systems)
In computing, a folder, directory, catalog, or drawer, is a virtual container originally derived from an earlier Object-oriented programming concept by the same name within a digital file system, in which groups of computer files and other folders can be kept and organized.A typical file system may...
in a hierarchy. It can be likened to the root of a tree
Tree (data structure)
In computer science, a tree is a widely-used data structure that emulates a hierarchical tree structure with a set of linked nodes.Mathematically, it is an ordered directed tree, more specifically an arborescence: an acyclic connected graph where each node has zero or more children nodes and at...
— the starting point where all branches originate.
Metaphor
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 systemOperating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...
s, files
Computer file
A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished...
can be placed inside the root directory, as well 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 UnixUnix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...
and Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....
systems, the root directory is denoted
/
. 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 mountMount (computing)
Mounting takes place before a computer can use any kind of storage device . The user or their operating system must make it accessible through the computer's file system. A user can access only files on mounted media.- Mount point :A mount point is a physical location in the partition used as a...
ed partitions are "branches" of this root.
Under DOS
DOS
DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...
and Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
, each partition has a drive letter assignment
Drive letter assignment
Drive letter assignment is the process of assigning alphabetical identifiers to physical or logical disk drives or partitions in the root filesystem namespace; this usage is now mostly found in Microsoft operating systems...
(labeled
C:\
for a particular partition C) and there is no common root directory above that. DOS 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 schemeURI scheme
In the field of computer networking, a URI scheme is the top level of the Uniform Resource Identifier naming structure. All URIs and absolute URI references are formed with a scheme name, followed by a colon character , and the remainder of the URI called the scheme-specific part...
, 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
Process (computing)
In computing, a process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system , a process may be made up of multiple threads of execution that execute instructions concurrently.A computer program is a...
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
Chroot
A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children. A program that is run in such a modified environment cannot name files outside the designated directory tree. The term "chroot" may refer to the chroot...
system call
System call
In computing, a system call is how a program requests a service from an operating system's kernel. This may include hardware related services , creating and executing new processes, and communicating with integral kernel services...
. This is typically done for security purposes to restrict which files a process may access to just a subset of the file hierarchy.
/root
On many UnixUnix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...
es, there is also a directory which is named /root. Confusingly, it is not a root directory in the sense of this article, but rather the home directory
Home directory
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 is defined by the operating system involved; for example, Windows systems between 2000 and 2003 keep home directories in a folder...
of the Superuser
Superuser
On many computer operating systems, the superuser is a special user account used for system administration. Depending on the operating system, the actual name of this account might be: root, administrator or supervisor....
(conventionally known as "root").
VMS
In the VMSOpenVMS
OpenVMS , previously known as VAX-11/VMS, VAX/VMS or VMS, is a computer server operating system that runs on VAX, Alpha and Itanium-based families of computers. Contrary to what its name suggests, OpenVMS is not open source software; however, the source listings are available for purchase...
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 MSDOS per-disk "root directory" in VMS is referred to as a "Master File Directory" and is specified as [000000]
See also
- Filesystem Hierarchy StandardFilesystem Hierarchy StandardThe Filesystem Hierarchy Standard defines the main directories and their contents in Linux operating systems. For the most part, it is a formalization and extension of the traditional BSD filesystem hierarchy....
(FHS) - Home directoryHome directoryA 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 is defined by the operating system involved; for example, Windows systems between 2000 and 2003 keep home directories in a folder...
- Parent directoryParent directoryIn computing, the parent directory of a given directory A is the directory B in which A is located. In As absolute path, B is the predecessor of A....
- Working directoryWorking directoryIn computing, the working directory of a process is a directory of a hierarchical file system, if any, dynamically associated with each process. When the process refers to a file using a simple file name or relative path , the reference is interpreted relative to the current working directory of...
External links
- Root Directory Definition - by The Linux Information Project (LINFO)