The filesystem tree and navigation
Sign in to read this lesson
On Linux every file lives in one tree that starts at the root directory (/). In this lesson we learn what the main directories are for, the difference between absolute and relative paths, and how to move around the tree with pwd, cd and ls.
What you will learn
- Linux has no drive letters: all files sit in one tree that starts at / (root).
- Main directories: /etc — configuration, /home — users, /var — changing data and logs, /tmp — temporary files, /usr — programs.
- An absolute path starts at
/(/var/log); a relative path is counted from where you are (log,../etc). - Special names:
.— this directory,..— one level up,~— home directory,-— the previous directory. pwd— where am I,cd— go,ls -l— detailed list,ls -a— hidden files too (names starting with a dot).
The lesson has 5 key points, an explanation and 5 questions. It opens with a package.