Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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)?

share|improve this question
2  
Btw, you can use cd without args to go to your home. –  enzotib Nov 28 '11 at 16:57
2  
and you dont have to write the leading / -- cd ~ without the / is enough –  SkaveRat Nov 28 '11 at 18:31
add comment

1 Answer

up vote 13 down vote accepted

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:

$ cd /
$ cd ..

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.

share|improve this answer
    
do you mean "cd .." will stop when it reaches the root directory? Can I understand in this way? –  Mellon Nov 28 '11 at 21:11
1  
Yes that's a very good way to look at it. My advice to you is to experiment as much as you can and read a unix tutorial. (hint: pwd will output your current working directory) –  rahmu Nov 28 '11 at 22:44
    
It's the root of the tree and is written as /. In node parlance, everything branches off from root until you get to the leaf nodes (files) –  Fiasco Labs Nov 29 '11 at 2:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.