07: Navigating upwards in the Unix filesystem

Queen Mary University of London  Wurm lab

Frequently, you will find that you want to go ‘upwards’ one level in the directory hierarchy. Two dots .. are used in Unix to refer to the parent directory of wherever you are. Every directory has a parent except the root level of the computer. Let’s go into the learning_unix directory and then navigate up two levels:

learner@:~$ cd learning_unix/
learner@:learning_unix$ cd ..
learner@:~$ cd ..
learner@:home$

What if you wanted to navigate up two levels in the file system in one go? It’s very simple, just use two sets of the .. operator, separated by a forward slash:

cd ../..
Previous Table of Content Next