After cd .. at /, why are we still at /?
pradeep@pradeep-laptop:/> cd ..
Is there a specific reason for this behavior?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
The root directory has a '.' and a '..' entry in it, and the inode number for each is the same. Traditionally, the inode number is 2; it still is on MacOS X, Linux, Solaris. So, when you do 'cd /; cd ..', you end up at the same location.
In the 1980s, there was a system called Newcastle Connection that treated networked computers as being above the root of your local computer. Thus, on such a machine, you would type:
to change directory to a remote file system.
(You can find the paper via a Google search of 'Newcastle Connection' - the URL is intractable.)
cd .. command takes you up on level in the directory structure. Since you're already at the highest level, it just leaves you at the root directory.