--- layout: page category: Filesystem tags: absolute and relative paths author: Marwan Announ title: fs previous-page: pages/fs/rela_abso ---

Relative Path!

Relative path is defined as path related to the present working directory(pwd).
Suppose I am located in /home/user1 and I want to change directory to /home/user1/Documents.
I can use relative path concept to change directory to Documents.


pwd/home/user1cd Documents




Then you could tell me what is the difference between Absolute and Relative.
If you observe, there is a little bit difference, where in relative there is no "/".
Meanwhyle using absolute path you have to write "/", in this case cd /home/user1/Documents.

Example of Relative path's uses:

Now, as we learned from the previous pages we can use other commands in addition to "cat", such as:

pwd
cd .

pwd
cd ..

pwd
cd ..

pwd
cd


and so on.. I know, it's boring but it is one of the disadvantages of not being present in the
working directory

Now I will show you in many examples.

 pwd to know where i am
relative paths command
 funning with 'cd to return back