Linux Mint

How to Go to Root Directory in Linux

Root directory or folder in any operating system is the one containing all the folders, data, files, directories, and subdirectories. In the Linux operating system, everything that needs to support a system is stored in the root directory. Many beginners mixed the root directory with the home directory and considered them the same. Root directory is the uppermost directory in the system whereas the home directory comes under the branch of root directory.

In a file hierarchy, the root directory is mentioned at the top of the tree as it also contains programs that help to boot the system and device directory.

How to go to root Directory

Root directory is presented with a slash (/) in Linux distributions. If you want to move towards the root directory; only one command you need to follow (which will be discussed later).

Linux provides a utility to change the working directory called the “cd” command-line tool. No matter where you’re in the system, when executing a cd command with slash (/), it will change your current directory to the root directory.

The cd command is not only used to navigate towards the root directory, but also can move to the home directory or any file/folder.

This article is specifically written for how we can move towards the root directory.

How to go to root Directory through cd Command

As you can see, my current working directory is desktop:

To change and move it to the root directory, the following command you need to execute:

$ cd /

As you can see, the “/$” sign indicates that you’re in the root directory now.

Conclusion

Root directory is the uppermost directory in the Linux system containing all the files, device data and system information in the form of directories. To move to the root directory use “cd /” command, similarly to go to the home directory you must use the similar command.

About the author

Syeda Wardah Batool

I am a Software Engineer Graduate and Self Motivated Linux writer. I also love to read latest Linux books. Moreover, in my free time, i love to read books on Personal development.