Beginner Foundations · lesson 1 · 2026-10-20
Linux Folders Explained for Windows Users
Before you start
- Any Linux to explore: a virtual machine, Kali, or WSL on Windows 11 (where your C: drive is
/mnt/c). The folders are the same on every Linux. - The video uses a disposable practice container, so some files are lesson props:
/var/log/auth.logholds a planted practice log with made-up documentation addresses, andDownloads/photo.jpgis a harmless script. On your own machine those files will differ or be missing. Some newer systems keep logins in the journal instead (journalctl), and reading logs may needsudo. free,dfandtopshow your own computer’s real memory, disk and CPU.- Practice only on machines you own or are allowed to use.
This is your C drive. On Linux it is called slash, and every folder in it has a Windows twin you already know.
ls /
By the end of this video you will know where your files live, where the programs live, and where a defender looks first when something feels wrong. Let’s start from zero.
First, two words. A folder is a container for files, exactly like the yellow folders in Windows File Explorer. Linux people often call a folder a directory. Same thing, different word.
Folder = directory
- A folder holds files, just like in File Explorer
- Linux people say directory. It means folder
- A path is the address of a file, like C:\Users\you\notes.txt
And a path is the address of a file. On Windows you have seen paths like C colon, backslash, Users, backslash, your name. Linux has paths too. They just look a little different.
Here is the biggest difference. Windows gives every drive a letter, C, D, E. Linux has no drive letters at all. There is one single tree of folders, and the top of that tree is called root, written as one forward slash.
One tree, no drive letters
- Windows: C:\ is the top of your main drive
- Linux: / (slash) is the top of everything
- A USB stick is not E: — it shows up as a folder
Everything on the computer hangs off that one slash. Your files, the programs, the settings, even a USB stick you plug in. It all shows up as a folder somewhere under slash.
Here is the whole map we will walk through today. On the left, the Linux folder. On the right, the Windows place you already know.
Linux folder → Windows twin
/ /home /etc /usr/bin /opt
| Part | What it does |
|---|---|
/ |
C:\ — the top of everything |
/home/hq |
C:\Users\hq — your own files |
/etc |
the Registry and C:\ProgramData — settings |
/usr/bin |
C:\Windows\System32 — the built-in programs |
/opt |
C:\Program Files — extra apps you install |
And the second half of the map. Keep these in mind. We will open almost every one of them in the terminal.
Linux folder → Windows twin
/var/log /tmp /proc /root /mnt
| Part | What it does |
|---|---|
/var/log |
Event Viewer — the computer’s diary |
/tmp |
%TEMP% — scratch space anyone can write to |
/proc |
Task Manager — the running programs |
/root |
C:\Users\Administrator — the admin’s folder |
/mnt, /media |
D: and E: — extra drives and USB sticks |
Two gotchas catch every Windows user. One, Linux uses a forward slash, not a backslash. Two, capital letters matter. On Windows, Documents with a capital D and documents in lower case are the same folder. On Linux they are two different names.
Two gotchas for Windows users
- Forward slash / — not backslash \
- Capitals matter: Documents and documents are different
- We will prove the second one live in a minute
Now, open the terminal. The terminal is a window where you type commands instead of clicking. On Windows that is like Command Prompt or PowerShell. This one is running on a disposable practice Linux machine, so nothing we do here can hurt anything.
Step one. Where am I right now?
1 — Where am I?
pwd
| Part | What it does |
|---|---|
pwd |
print working directory: show the folder you are in right now |
p w d, and press Enter.
Slash home, slash h q. Read it from the left. Start at root, go into the home folder, then into the folder for the user h q. That is exactly C colon, backslash, Users, backslash, h q on Windows. This is your own folder.
Step two. Who else has a folder on this machine?
2 — List every user’s folder
ls /home
| Part | What it does |
|---|---|
ls |
list: show what is inside a folder |
/home |
the folder that holds every user’s own folder |
Type l s, space, slash home, and press Enter.
Two users, alex and h q. Each one gets a folder inside home, the same way every person who logs in to a Windows PC gets a folder inside C colon, backslash, Users.
Now let’s look inside our own folder, and test that capital letters gotcha. Type c d, space, documents, all lower case, and press Enter. c d means change directory. It moves you into a folder.
cd documents
No such file or directory. The folder is right there, but we typed a small d, and to Linux that is a completely different name.
Try again with a capital D. c d, space, Documents with a capital D, then two ampersands and p w d. Two ampersands mean: run the first command, and if it worked, run the next one. So it moves us, then shows us where we landed.
cd Documents && pwd
That worked. Slash home, slash h q, slash Documents. Your Documents folder, same idea as on Windows.
Type l s, space, Documents, to see what is in it.
ls Documents
Two ordinary text files, notes and plan. Your files live in your home folder, just like on Windows.
Step three. Moving around. In File Explorer you click the up arrow, or type an address in the address bar. The terminal has the same two ideas.
3 — Moving around
cd /home/hq/Documents cd .. cd ~ cd /
| Part | What it does |
|---|---|
/home/hq/Documents |
a full path: starts with /, works from anywhere, like the address bar |
Documents |
a relative path: starts from where you are now |
.. |
two dots: the folder one level up, like the up arrow |
~ |
tilde: a shortcut for your own home folder |
/ |
slash on its own: jump to the very top |
&& |
and then: run the next command only if the first one worked |
Just now we typed Documents on its own. That is a relative path. It only works because we were already standing in our home folder. A full path starts with a slash, and works from anywhere, like typing a whole address into the address bar.
Type c d, space, slash home, slash h q, slash Documents, then two ampersands and p w d.
cd /home/hq/Documents && pwd
Same folder, reached by its full address.
Now the up arrow. From our home folder, type c d, space, dot dot, then two ampersands and p w d. Two dots always means one level up.
cd .. && pwd
We went up from h q, into the home folder that holds every user.
Lost? Type c d, space, tilde, the little wave on the key next to number one, then two ampersands and p w d. Tilde always takes you back to your own home folder.
cd ~ && pwd
Home again, from wherever we were.
And the very top. Type c d, space, slash, then two ampersands and p w d.
cd / && pwd
Just a slash. We are standing at root, the top of the whole tree, the place we started this video.
Step four. Where does Linux keep its settings?
4 — Read a settings file
cat /etc/hostname
| Part | What it does |
|---|---|
cat |
print a file’s contents on the screen |
/etc |
the settings folder, like the Windows Registry |
hostname |
the file that holds this computer’s name |
On Windows, a lot of settings hide in the Registry, which you need a special tool to read. On Linux, settings are plain text files, and most of them live in one folder, slash e t c.
Type c a t, space, slash e t c, slash hostname, and press Enter.
That is this computer’s name, the same name you would find on Windows under Settings, System, About. Linux just keeps it in a text file anyone can read.
One more. Type head, space, dash 3, space, slash e t c, slash o s dash release. head shows only the first lines of a file, and dash 3 means three lines.
head -3 /etc/os-release
Which Linux this is, and which version. On Windows you would open Settings to find that. Here it is three lines of text.
Step five. Where do the programs live?
5 — Find where a program lives
which ls
| Part | What it does |
|---|---|
which |
tell me where this program is stored |
ls |
the program we are looking for |
Every command you type is actually a small program sitting in a folder. Type which, space, l s, and press Enter.
The l s command is a program stored in slash u s r, slash bin. bin is short for binary, which means a program. That folder is Linux’s version of C colon, Windows, System32, where the built-in programs live.
Let’s prove it, with two new tools.
5 — Search a list with grep
ls /usr/bin | grep -x pwd
| Part | What it does |
|---|---|
ls /usr/bin |
list every program in that folder |
| |
pipe: send that list into the next command, instead of the screen |
grep |
search text and keep only the lines that match |
-x |
match the whole line exactly, not just part of it |
pwd |
the name we are searching for |
The pipe is the straight line key, shift plus backslash. It takes what one command prints, and feeds it into the next command. grep is a search. It reads text, and keeps only the lines that match what you asked for. Dash x means the whole line must match exactly.
Type l s, space, slash u s r, slash bin, space, pipe, space, grep, space, dash x, space, p w d.
There it is. The very first command we typed today is just a file in that folder. So are l s, cat, head, and most of the commands you will ever type.
And when you install a big extra app yourself, the kind you would put in Program Files on Windows, it often goes in slash o p t, short for optional. On this practice machine it is empty, because we have not installed anything extra.
Step six. This one surprises every Windows user. On Windows, the end of a file name decides what it is. Dot e x e runs. Dot j p g opens as a picture. On Linux, the name decides nothing.
6 — The name does not decide what runs
ls -l Downloads
| Part | What it does |
|---|---|
-l |
long view: shows each file’s permissions |
r w x |
read, write, and execute: x means this file is allowed to run |
photo.jpg |
the name says picture. The x says program |
What decides is a permission called execute, the letter x. If a file has x, Linux will run it as a program, whatever its name is. Type l s, space, dash l, space, Downloads.
Two files. readme dot t x t starts with r w, read and write, and no x. But look at photo dot j p g. r w x. That x means it can run. A photo should never need that.
Let’s see what is really inside it. Type c a t, space, Downloads, slash photo dot j p g.
cat Downloads/photo.jpg
That is not a picture at all. It is a tiny program, a script. Here, a harmless one we made for this lesson. Watch what happens when we run it. Type dot slash Downloads, slash photo dot j p g. The dot slash means run this file from right here.
./Downloads/photo.jpg
It ran. A file called photo dot j p g just ran as a program. This is exactly how attackers fool people. So on Linux, never trust the name. Check for the x.
Step seven. Deleting. On Windows, delete sends a file to the Recycle Bin, and you can get it back. On Linux, the r m command has no Recycle Bin. It is gone.
7 — Delete, with no Recycle Bin
rm Downloads/photo.jpg
| Part | What it does |
|---|---|
rm |
remove: delete the file, permanently |
Downloads/photo.jpg |
the fake photo we just caught |
That fake photo has to go. Type r m, space, Downloads, slash photo dot j p g, then two ampersands and l s Downloads to check.
rm Downloads/photo.jpg && ls Downloads
Only readme is left. No question, no are you sure, and no Recycle Bin to restore it from. That is why you practice on a disposable machine like this one, and why you read an r m command twice before you press Enter on a real one.
Step eight, and this is the one defenders care about most. Where does Linux write down what happened?
8 — Open the computer’s diary
ls /var/log
| Part | What it does |
|---|---|
ls |
list: show what is inside a folder |
/var/log |
the log folder, like Windows Event Viewer |
A log is a diary the computer keeps. Every time something happens, like a login, an install, or an error, a line gets written. On Windows you read that diary in Event Viewer. On Linux it is a folder, slash v a r, slash log.
Type l s, space, slash v a r, slash log, and press Enter.
A handful of log files. The one to remember is auth dot log. auth is short for authentication, which just means logging in. Every login attempt gets written there.
One honest note. This is a practice machine, so we planted a small practice log here, with made up addresses, so there is something to see. On a real server this file is written for you, automatically.
Type tail, space, dash 5, space, slash v a r, slash log, slash auth dot log. tail is the opposite of head. It shows the last lines, which are the newest.
tail -5 /var/log/auth.log
Read the words. Failed password for root. Failed password for invalid user admin. Invalid user test. All from the same address. Somebody is guessing passwords, trying the usual names one after another.
And the last line, accepted password for h q, from a different address. That is a normal, successful login. This is how a defender reads the story of a machine.
How many failed attempts were there? Type grep, space, dash c, then Failed password in quotes, then the file. Dash c means count the matching lines instead of printing them.
grep -c "Failed password" /var/log/auth.log
Four failed logins. On a real server, if that number is in the thousands, someone is attacking it. One command, and you just did your first piece of log analysis.
Step nine. The scratch folder.
9 — Look inside the temp folder
ls -la /tmp
| Part | What it does |
|---|---|
ls |
list a folder |
-l |
long view: permissions, owner, size, date |
-a |
all: also show hidden files that start with a dot |
/tmp |
the temp folder, like %TEMP% on Windows |
slash t m p is the temporary folder, like the percent TEMP percent folder on Windows. Programs drop scratch files here. Type l s, space, dash l a, space, slash t m p.
Look at the first line. The letters r w x, repeated three times, mean everybody can read, write, and use this folder. That is why attackers love it. It is one of the few places any account can drop a file.
And there is a hidden file called dot x. On Windows, hiding a file is a checkbox in Properties. On Linux, any name that starts with a dot is hidden, unless you add dash a. This one is a harmless empty test file, but a hidden file in the temp folder is exactly the kind of thing a defender stops and asks about.
Step ten. Task Manager, as a folder.
10 — Running programs are folders too
head -3 /proc/1/status
| Part | What it does |
|---|---|
/proc |
one folder for every running program, like Task Manager |
1 |
the program’s ID number, called a process ID |
status |
a file describing that running program |
On Windows, you open Task Manager to see what is running. Linux has a strange and clever idea. Every running program, called a process, gets its own folder inside slash p r o c, named after its ID number. Type head, space, dash 3, space, slash p r o c, slash 1, slash status.
Process number one is a program called sleep, and its state is S, sleeping. On this practice machine, the very first program just sits and waits, so the machine stays switched on. That is all it does. Tools like Task Manager on Linux simply read these folders for you.
And the Performance tab? How busy is the CPU, how much memory is in use, how full is the disk? Three commands. One honest note first. This practice machine borrows the real computer’s hardware, so these are real numbers.
10 — CPU, memory and disk
free -h df -h / top -bn1 | grep Cpu
| Part | What it does |
|---|---|
free -h |
memory (RAM): total, used and available. -h means human sizes, like 8G |
df -h / |
disk free: space used and left on the main drive |
top -bn1 |
Linux’s own Task Manager. -b -n1 takes one snapshot instead of a live screen |
grep Cpu |
keep only the CPU line |
Memory first. Type free, space, dash h. h means human, so sizes show as G for gigabytes instead of giant numbers.
free -h
Look at the Mem line. total is all the memory. used is what programs are using right now. available is what is still free to use. Same as the Memory graph in Task Manager.
Disk next. Type d f, space, dash h, space, slash. d f means disk free, and the slash means the main drive, your C drive.
df -h /
Size, used, available, and the use percent. That percent is the same bar you see under This PC on Windows.
And the CPU. top is Linux’s own live Task Manager. Type top, space, dash b n 1, space, pipe, space, grep, space, Cpu with a capital C. Dash b n 1 takes one snapshot instead of a live screen, and grep keeps only the CPU line.
top -bn1 | grep Cpu
Find the letters i d, short for idle. That is the part of the CPU doing nothing. If idle says 95, the CPU is only 5 percent busy. Type top on its own to watch it live, and press q to quit.
Step eleven. The admin’s folder.
11 — Try the admin’s folder
ls /root
| Part | What it does |
|---|---|
/root |
the admin’s own folder, like C:\Users\Administrator |
Careful, two different things share the word root. Slash on its own is the root of the tree. Slash root, spelled out, is the home folder of the administrator account. Type l s, space, slash root.
Permission denied. And that is good news. A normal user cannot look inside the administrator’s folder, the same way a normal Windows account cannot open the Administrator’s files. When this stops being true, something is wrong.
So how do you do admin things on Linux? On Windows you right click and choose Run as administrator, and a box pops up asking if you are sure. On Linux, you put the word sudo in front of the command, and it asks for your password. Same idea, typed instead of clicked. This practice machine does not even have sudo installed, so nobody here can become the administrator, which is exactly what we want for a lab.
sudo = Run as administrator
- Windows: right click → Run as administrator
- Linux: type sudo in front of the command
- It asks for your password, like the Windows admin prompt
- Only use it when you know exactly why
Step twelve. Extra drives. On Windows, a USB stick shows up as a new letter, like E. On Linux there are no letters, so extra drives appear as folders, usually under slash m n t or slash media. Same tree, just one more branch.
12 — Where do USB sticks go?
- Windows: a new drive letter, like E:
- Linux: a folder under /mnt or /media
- Still one tree, starting at /
And one tip just for Windows users. Windows 11 can run Linux built in, with a feature called W S L, the Windows Subsystem for Linux. Inside it, your whole C drive shows up as a folder, slash m n t, slash c. Your Windows files, at a Linux address.
Linux on Windows: your C: is /mnt/c
- WSL runs Linux inside Windows 11
- Your C: drive appears as /mnt/c
- C:\Users\you is /mnt/c/Users/you
So, something feels wrong on a Linux machine. Where do you look first? Start with the diary in slash v a r, slash log. Then the scratch folder, slash t m p. Then the users’ folders in slash home. Then the settings in slash e t c.
Something feels wrong. Look here first
- /var/log — what happened (Event Viewer)
- /tmp — what got dropped (%TEMP%)
- /home — whose files changed (C:\Users)
- /etc — which settings changed (the Registry)
You already knew all of this from Windows. You just learned the new names. Practice only on your own machine or a practice lab like this one.
In the next video, we follow what happens when you open a website, step by step, from your computer, to the address, to the server, and back. Networking for cybersecurity beginners. See you there.