I am using Ubuntu.
I know by using cd ~/
, I can go to home/ directory.
But if I want to go to the directory (I do not know the official name of this directory) which contains etc/
, var/
, opt/
, … sub-directories, what is the symbol used to refer to this directory? (And by the way what is the official name of this directory? root directory?)
Basically, I would like to cd
to that directory without using cd ..
but one symbol to refer to it, is there such a symbol for it (like ~
refers to home directory)?
Best Answer
This directory is called the root directory and is referenced by the symbol "/"
You can try
cd /
to go there.Notice that if you try this:
You're still at the root directory.
NB: Every Unix system has a super user account called root, whose home directory is
/root
. I know it's redundant, it can be ambiguous and lead to confusion. So make sure, every time you mention "root" to know whether it refers to the directory/
or the (super)user.