Home » How to Get Back to Root Directory in CMD

How to Get Back to Root Directory in CMD

You can use the cd \ command in Command Prompt (CMD) to navigate back to the root directory:

cd \

In this example, the cd \ command will change the current directory to the root directory of the current drive.

The following example shows how to use this syntax in practice.

Example: How to Get Back to Root Directory in CMD

Suppose that we want to navigate back to the root directory from our current directory. We can type the following command:

cd \

Output: 👇️

CMD - Get back to root directory
CMD – Get back to root directory

We can see that the current directory has been changed to the root directory of the current drive.

Conclusion

The cd \ command will always take you back to the root directory of the current drive.

You can find more topics about Active Directory tools and PowerShell basics on the ActiveDirectoryTools home page.