Module 8 · File System 45 min

This is the bit where Windows users get stuck — and then, once it clicks, they wonder why Windows ever needed letters. There's no C: drive on Linux. There's just /, and everything lives inside it.

By the end of this module, you will:

  • Describe the purpose of six key Linux directories (/etc, /var, /home, /usr, /tmp, /bin)
  • Explain why Linux uses a single root directory instead of drive letters
  • Navigate the filesystem using absolute and relative paths
  • Locate configuration and log files on a standard Linux installation
  • Identify the special directories /dev, /proc, /sys and what they expose
  • Distinguish absolute paths (/etc/hosts) from relative paths (../config) and use the ~, .., . shortcuts
  • Explain what "mounting" means and where USB drives and network shares appear in the tree

The big idea: everything is a file

On Linux, everything is a file. Your documents are files. Your hard drive is a file. Your USB stick is a file. Even your keyboard and your network card show up as files. And all of them live inside one big tree that starts at /. No C:\, no D:\, no E:\ — just one tree, and every disk plugs in somewhere on it.

/ ← Root. Like C:\ but for EVERYTHING
├── home/ ← C:\Users\
│ └── user/ ← C:\Users\user\
│ ├── Desktop/ ← C:\Users\user\Desktop
│ ├── Documents/
│ └── Downloads/
├── etc/ ← C:\Windows (system config files)
│ ├── hostname ← your computer's name
│ ├── hosts ← C:\Windows\System32\drivers\etc\hosts
│ └── passwd ← user accounts list
├── bin/ ← C:\Windows\System32 (basic commands)
├── usr/
│ └── bin/ ← more executables (installed software)
├── var/
│ └── log/ ← Event Viewer logs, but text files
├── tmp/ ← %TEMP% — cleared on reboot
├── media/ ← D:\ E:\ USB drives auto-mount here
└── mnt/ ← manually mounted drives

Six more folders you'll see

The tree above shows the everyday folders. Here are six more you'll bump into in tutorials and error messages. You almost never edit them by hand — but you'll see them, so it helps to know what each one is for.

Folder What's in there Closest Windows thing
/devYour hardware shows up here as files. Your hard drive is /dev/sda. Your keyboard, your microphone — all files in here. That's "everything is a file" in action.Device Manager (kind of)
/procLive info about your computer right now — what's running, what the CPU is doing. Run cat /proc/cpuinfo and you see your processor.Task Manager and System Information mashed together
/sysHardware details from deep inside Linux. Battery level, fan speed, which USB things are plugged in.The hardware properties pages
/rootThe admin user's home folder. Not the same as / — easy to mix up. / is the top of the tree; /root is just one folder inside it.C:\Users\Administrator
/optApps that don't come from the normal Linux software store. Slack, Spotify and Zoom often install themselves here.C:\Program Files
/bootThe Linux kernel itself, plus the files that load it when you turn the computer on. Don't touch anything in here unless you know exactly what you're doing.The hidden System Reserved partition

Four things Windows does differently

Capital letters matter

On Linux, File.txt, file.txt and FILE.TXT are three different files. Windows doesn't care about capitals — it treats them as the same file. Linux does care. Type the name exactly the way it's spelled, every time. This is probably the number one reason "file not found" errors catch Windows people out.

Slashes go the other way

Windows writes paths like C:\Users\user\ with backslashes leaning left. Linux writes /home/user/ with forward slashes leaning right. Always forward slash on Linux. The backslash \ means something completely different here — it's used to "escape" special characters in commands.

Hidden files start with a dot

A file named .bashrc is hidden. That's it — no checkbox, no special setting, just put a dot at the front of the name and Linux hides it. To see hidden files, type ls -a in the terminal, or press Ctrl+H in the Files window.

File extensions don't matter to Linux

Windows decides what kind of file something is by looking at the end of the name — .exe, .txt, .docx. Linux doesn't care. It looks inside the file to figure out what it is. You should still use extensions though, because humans (including future you) read filenames and want to know what they're looking at.

Windows tool → Linux tool: the cheat sheet

Every Windows tool you know has a Linux version that does the same job. Here's the side-by-side. Bookmark this page — you'll come back to it for the next ten modules.

On WindowsOn LinuxWhat's different
Registry Editor/etc config filesPlain text files you can read
Event ViewerjournalctlEasier to search
ServicessystemdDoes more
Task Managerhtop / btopPrettier, shows more
Control PanelGNOME Settings / /etcA window for clicks, plus text files for everything else
Add/Remove ProgramsaptMuch faster
C:\Windows\System32/usr/bin, /binWhere the programs live
%TEMP%/tmpWiped when you restart
Notepadnano, vim, geditStart with nano — it's the friendly one
Run as AdministratorsudoYou decide command by command

Two ways to write where a file is

There are two ways to tell Linux where a file is. The difference matters and saves a lot of typing once you know it.

Name Starts with Example What it means
Full path//home/jane/notes.txtAlways points to the same file, no matter where you are right now. Like writing out the full street address.
Short pathanything elsenotes.txt or ./notes.txtMeans "this file in the folder I'm in right now." Like saying "the cafe round the corner" — only makes sense if you know where the person is standing.
Home shortcut~~/notes.txt~ is shorthand for your home folder. Linux swaps it out for /home/jane (or whoever you are) before running the command.
Go up one..../notes.txt or cd ..The folder one level above where you are. Stack them: ../../ goes up two levels.
Right here../script.shThe folder you're standing in. To run a script in the current folder, you have to put ./ in front. That's a safety rule — it stops Linux running random files by accident.

Quick check: type pwd (it stands for "print working directory"). It tells you where you are right now. Try it in a terminal — you'll see your full path.

Symlinks — Linux's shortcuts (spot one in the terminal below)

A symlink (short for "symbolic link") is Linux's version of a Windows shortcut. It's a name that points at another file or folder, so the same thing seems to exist in two places at once. You'll see them all over Linux. When you list files with ls -la and you see an arrow like bin -> usr/bin, that arrow is a symlink. It's saying: "bin isn't really here — go look in usr/bin."

Try it now — spot a symlink Run ls -la /bin. On Ubuntu you'll see bin -> usr/bin. /bin isn't really a folder any more — it's a shortcut to /usr/bin. Both names point at the same place. Linux keeps the old name around so older programs that say "look in /bin" still work.

Mount points — when a folder is actually a disk

Linux doesn't have drive letters. Instead, every disk, USB stick and network share gets mounted — meaning Linux picks a folder and makes that folder the door into the disk. Plug in a USB stick and Linux automatically mounts it at /media/your-username/USB-NAME/. Open that folder and you're looking at the files on the USB. Pull the USB out (after ejecting it) and the folder goes back to being empty.

Folder What ends up here
/media/username/USB sticks, SD cards and external hard drives. Linux mounts them here on its own when you plug them in.
/mnt/Disks and network drives you mount yourself, either with the mount command or by adding them to /etc/fstab so they mount automatically.
/run/user/1000/gvfs/Where the GNOME Files app puts network shares you connect to from "Other Locations".

So where did the drive letters go?

They're still there — they're just folders now. Your USB stick isn't D:\, it's /media/jane/MY-USB/. Open the folder, drag files in and out, eject it when you're done. The win: every disk fits into one tree, so you never get the Windows "can't find E: drive" surprise when a USB isn't plugged in.

Try these four commands right now using the terminal below

Reading about folders isn't enough — type these four commands in your terminal and see what's actually inside your machine:

1
Your home folder

Type ls -la ~. This shows all the files in your home folder — the one with your documents and settings in it. ~ is the shortcut for your home folder. It's the same idea as C:\Users\yourname on Windows.

2
The settings folder

Type ls /etc | head -20. This shows the first 20 settings files. Every program on your system stores its settings here. It's Linux's version of the Windows Registry — except they're just plain text files you can open and read.

3
Today's log files

Type ls -lth /var/log | head -10. This shows the 10 log files that were updated most recently. The -t bit sorts them by time. When something breaks, this is the first place to look — it tells you which log probably has the error.

4
The temporary folder

Type ls /tmp | head -10. These are throwaway files. Everything in /tmp gets deleted when you restart the computer. Never save anything you want to keep in /tmp.

Capital letters — try this so you never forget Type ls /home — it works. Then type ls /Home with a capital H — it fails. Linux treats capital and lowercase letters as completely different. Documents and documents are two different folders. File.txt and file.txt are two different files. This is the number one cause of "file not found" errors when you switch from Windows.