What Is a Root Folder or Root Directory?

Definition & examples of root folders and root directories

The root folder, also called the root directory or sometimes just the root, of any partition or folder is the "highest" directory in the hierarchy. You can also think of it in general as the start or beginning of a particular folder structure.

The root directory contains all other folders in the drive or folder, and can, of course, also contain files. You can visualize this with an upside-down tree where the roots (the root folder) are at the top and the branches (subfolders) fall below; the root is what holds together all of its lower items.

For example, the root directory of the main partition on your computer is probably C:\. The root folder of your DVD or CD drive might be D:\. The root of the Windows Registry is where hives like HKEY_CLASSES_ROOT are stored.

A illustration showing a root directory and its folders
Lifewire

ROOT is also an acronym for ROOT's Object Oriented Technologies, but it has nothing to do with root folders.

Examples of Root Folders

The term root may also be relative to whatever location you're talking about. For example, a program that installs to C:\Programs\Example uses that particular folder as its root, with potentially a series of subfolders beneath it.

This same thing applies to any other folder. Do you need to go to the root of the user folder for User1 in Windows? That's the C:\Users\Name1\ folder. This, of course, changes depending on what user you're talking about—the root folder of User2 would be C:\Users\User2\.

Accessing a Root Folder

A quick way to get to the root folder of the hard drive when you're in a Windows Command Prompt is to execute the change directory—cdcommand like this:

cd \

After executing, you'll immediately be moved from the current working directory all the way up to the root folder. So, for example, if you're in the C:\Windows\System32 folder and then enter the cd command with the backslash (as shown above), you'll immediately be moved from where you're at to C:\.

Similarly, executing the cd command like this:

cd..

...will move the directory up one position, which is helpful if you need to get to the root of a folder but not the root of the entire drive. For example, executing cd .. while in the C:\Users\User1\Downloads\ folder changes the current directory to C:\Users\User1\. Doing it again takes you to C:\Users\, and so on.

Below is an example where we start in a folder called Germany on the C:\ drive. As you can see, executing that same command in Command Prompt moves the working directory to the folder just before/above it, all the way to the root of the hard drive.

C:\AMYS-PHONE\Pictures\Germany>cd..
C:\AMYS-PHONE\Pictures>cd..
C:\AMYS-PHONE>cd..
C:\>

You may try to access a root folder only to find that you can't see it when you're browsing through Explorer. This is because some folders are hidden in Windows by default. See our article How Do I Show Hidden Files and Folders in Windows? if you need help unhiding them.

More About Root Folders & Directories

The term web root folder may sometimes be used to describe the directory that holds all of the files that make up a website. The same concept applies here as on your local computer—the files and folders in this root folder contain the main web page files, such as HTML files, that should be displayed when someone accesses the main URL of the website.

The term root used here shouldn't be confused with the /root folder found on some Unix operating systems, where it's instead of the home directory of a specific user account (which is sometimes called the root account). In a sense, though, since it's the main folder for that specific user, you could refer to it as the root folder.

In some operating systems, files can be stored in the root directory, like the C:/ drive in Windows, but some OSs don't support that.

The term root directory is used in the VMS operating system to define where all the user's files are stored.

FAQ
  • What is the root directory of an SD card?

    The root folder is the lowest level directory on your SD card. It's the first folder you see when you open your SD card. You may see folders named DCIM and MISC, or you may see nothing at all if you recently formatted your memory card.

  • What is the root directory in Linux?

    The /root directory in Linux is the user folder for the system administrator or root user. Like the Windows C:\Users folder, it has sub-directories for each user containing all the account's data.

  • How do I find the root directory in WordPress?

    The /html folder is the root directory for your WordPress files. You can access the root folder via SFTP, SSH, or the File Manager.

Was this page helpful?