The filesystem & paths
One tree, one root, and every path is either from here or from the top.
Before you start
On Linux, every file — a program, a photo, a config, a device — lives inside one huge tree. There are no drive letters (no C: or D:); everything hangs off a single root, written as /.
Where you "are" in that tree is called your **working directory**. Commands like ls and cat interpret filenames relative to it, which is why the same command can behave differently depending on where you ran it.
This lesson walks through the tree, shows the difference between absolute paths (from the root) and relative paths (from here), and explains what .. and ~ and - actually stand for.
Filesystem
one tree, one rootpwd prints where you currently are: /home/ana.
Step 1 of 7. Everything hangs off /. Linux has exactly one filesystem tree, rooted at `/`. There are no drive letters — additional disks and USB sticks are *mounted* into this tree at some directory. So every file in the system has one absolute path, and it always starts with a slash.
Step 01 / 07
Everything hangs off /
Linux has exactly one filesystem tree, rooted at /. There are no drive letters — additional disks and USB sticks are *mounted* into this tree at some directory.
So every file in the system has one absolute path, and it always starts with a slash.
pwd # /home/anals # relative to where you arecd projects # relative pathcd /etc # absolute path — leading slashcd .. # up one levelcd ~ # your home directorycd - # back to the previous directorycat notes.txt # relativecat /home/ana/notes.txt # absolute — same file