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:
As you can see, the “/$” sign indicates that you’re in the root directory now.
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.