
In a
computer
A computer is a machine that can be Computer programming, programmed to automatically Execution (computing), carry out sequences of arithmetic or logical operations (''computation''). Modern digital electronic computers can perform generic set ...
file system, and primarily used in the
Unix
Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
and
Unix-like
A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
s, the root directory is the first or top-most
directory in a hierarchy.
It can be likened to the trunk of a
tree
In botany, a tree is a perennial plant with an elongated stem, or trunk, usually supporting branches and leaves. In some usages, the definition of a tree may be narrower, e.g., including only woody plants with secondary growth, only ...
, as the starting point where all branches originate from. The root file system is the file system contained on the same
disk partition
Disk partitioning or disk slicing is the creation of one or more regions on Computer data storage#Secondary storage, secondary storage, so that each region can be managed separately. These regions are called partitions. It is typically the first ...
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.
Unix-like systems
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 path is the "empty" part before the initial directory separator character (
/
). All file system entries, including mounted file systems are "branches" of this root.
chroot
In UNIX-like operating systems, each
process
A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic.
Things called a process include:
Business and management
* Business process, activities that produce a specific s ...
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
system call
In computing, a system call (syscall) is the programmatic way in which a computer program requests a service from the operating system on which it is executed. This may include hardware-related services (for example, accessing a hard disk drive ...
. This is typically done to create a 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.
Super-root
Some Unix systems support a directory below the root directory. Normally, "/.." points back to the same
inode
An inode (index node) is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block locations of the object's data. File-system object attribu ...
as "/", however, under , this can be changed to point to a super-root directory, where remote trees can be mounted.
If, for example, two workstations "pcs2a" and "pcs2b" were connected via "connectnodes" and "uunite" startup script, "/../pcs2b" could be used to access the root directory of "pcs2b" from "pcs2a".
DOS/Windows systems
Under
DOS,
OS/2
OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
, and
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, each partition has a drive letter assignment (e.g. the C partition is labeled
C:\
) and there is no public root directory on it.
Related uses
On many
Unix
Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
es, there is also a directory named (pronounced "slash root").
This is the
home directory
A home directory is a directory (file systems), file system directory on a multi-user operating system containing computer file, files for a given user (computing), user of the system. The specifics of the home directory (such as its name and loc ...
of the 'root'
superuser
In computing, the superuser is a special user account used for system administration. Depending on the operating system (OS), the actual name of this account might be root, administrator, admin or supervisor. In some cases, the actual name of the ...
. On many
Mac and
iOS systems this superuser home directory is .
A
home page
A home page (or homepage) is the main web page of a website. Usually, the home page is located at the Root directory, root of the website's Domain name, domain or subdomain. For example, if the domain is example.com, the home page is likely l ...
's
URL usually points to the root of the respective
website
A website (also written as a web site) is any web page whose content is identified by a common domain name and is published on at least one web server. Websites are typically dedicated to a particular topic or purpose, such as news, educatio ...
's
domain name
In the Internet, a domain name is a string that identifies a realm of administrative autonomy, authority, or control. Domain names are often used to identify services provided through the Internet, such as websites, email services, and more. ...
.
See also
*
Filesystem Hierarchy Standard
The Filesystem Hierarchy Standard (FHS) is a reference describing the conventions used for the layout of Unix-like systems. It has been made popular by its use in Linux distributions, but it is used by other Unix-like systems as well. It is main ...
(FHS)
*
Parent directory
In computing, a directory is a file system cataloging structure that contains references to other computer files, and possibly other directories. On many computers, directories are known as folders or drawers, analogous to a workbench or the t ...
*
Working directory
In computing, the working directory of a process is a directory of a hierarchical file system, if any, dynamically associated with the process. It is sometimes called the current working directory (CWD), e.g. the BSD getcwd function, or just c ...
References
{{Portal, Technology
File system directories