Tutorial explains how to go to root directory in Linux command – Ubuntu terminal and how to change home directory in Linux command line. See about the command to find root directory in Linux
Root Directory In Linux Ubuntu
The /root directory is the home directory of the root account. It must be known to all that the root is the user name or account that by default has access to all commands and files on a Linux.
The root account is also known as root user or the superuser.
The /root contains all other directories and their subdirectories. It is designated by a forward slash ( / ). It contains user’s configuration files.
It must be known that the /root is a subdirectory of the root directory, as indicated by the forward slash that begins its name.
How To Go To Root Directory In Linux Ubuntu Terminal
You can go to the root directory on a Linux system by using the cd command. The cd command is known as change directory command.
$ cd /
To navigate to the root user’s home directory, /root, run the command:
$ cd /root
If you are already logged into the root user account, the run:
# cd
You can also use the command cd ~ (note the tilde symbol).