Absolute vs Relative
Back on the island. This time, practise moving with different kinds of paths: absolute, relative, .., ~ and cd -.
How it works: the terminal below is a real Linux machine running in your browser. Click it and
type. Tasks tick themselves off as you complete them; questions are answered in the box under each task.
Press Reset any time for a fresh machine. Your password on this machine (for
sudo) is student.
Hints
Draw the tree on paper if it helps: island contains beach, jungle and cave; cave contains lake and tunnel.
Solution explanation
An absolute path works from anywhere. From lake, .. is cave, so ../tunnel/chamber leads to the chamber. cd - goes back to the lake. From jungle, ../beach goes up to island and into beach. ~/island/beach works wherever you are.
Show solution
cd /home/student/island/cave/lake
cd ../tunnel/chamber
cd -
cd /
ls ~/island/beach