Where Files Live on Linux

On Windows you have C:\, D:\, Program Files, and Users. Linux organizes things differently. Here's the map.

The big difference from Windows

On Windows, each drive gets its own letter (C:\, D:\, etc.). On Linux, there's one single folder tree starting from / (called "root" -- it's just the top-level folder, like the trunk of a tree). Everything branches off from there -- your files, your apps, USB drives, everything.

Think of it like an apartment building. On Windows, each drive is a separate building. On Linux, it's all one building with different floors and rooms.

You don't need to memorize all this. Most of the time you'll just use your home folder (/home/yourname) and install apps through the software center. This page is here when you're curious about what's behind the scenes.

The main folders

Here's what the top-level folders are for, explained in plain English:

/ - The top of everything (like C:\ on Windows) ├── home - Your personal files (Documents, Downloads, etc.) ├── etc - System settings (like Windows Registry, but readable text files) ├── usr - Where most programs and apps are installed ├── var - Logs, caches, and data that changes often ├── tmp - Temporary files (gets emptied on restart) ├── opt - Some third-party apps go here (Chrome, Discord, etc.) ├── media - USB drives and external storage show up here ├── dev - Your hardware (hard drives, USB ports, etc.) ├── boot - Files needed to start your computer ├── bin - Basic commands (like "copy", "move", "list files") ├── lib - Support files that programs need to run ├── proc - Live info about what your computer is doing right now ├── sys - Live info about your hardware ├── root - Home folder for the admin account ├── run - Temporary data from running programs ├── srv - Data for web servers (if you run any) ├── mnt - Where you manually connect extra storage └── sbin - Admin-only commands (restart, disk tools, etc.)

That's a lot of folders, but in daily use you'll mostly interact with just a few. Let's go through the important ones.

Your home folder (/home)

This is your space. It's like the Users\YourName folder on Windows or the ~ folder on Mac. Your documents, downloads, music, pictures, and settings all live here.

/home/yourname/
├── Documents/
├── Downloads/
├── Music/
├── Pictures/
├── Videos/
├── Desktop/
├── .config/      (hidden - app settings)
├── .local/       (hidden - user-installed stuff)
└── .bashrc       (hidden - terminal settings)
What's with the dot? Files and folders that start with a period (like .config) are hidden by default. They're usually settings files that apps create. You can see them in your file manager by pressing Ctrl+H, or in the terminal with ls -a.

Some handy shortcuts:

ShortcutWhat it meansWindows equivalent
~Your home folderC:\Users\YourName
.The folder you're currently inSame
..The folder one level upSame
/The very top of the file treeC:\

Where programs live (/usr and /opt)

When you install an app through your software center or package manager, it goes into /usr. This is like "Program Files" on Windows, but you don't normally browse it directly -- the package manager handles everything.

/usr/
├── bin/       Programs you can run (Firefox, Python, Git, etc.)
├── lib/       Support files those programs need
├── share/     Icons, themes, help files
└── local/     Stuff you installed manually (not from the app store)

Some apps (usually bigger commercial ones like Chrome or Discord) install into /opt instead. Think of it as a separate "apps" folder.

How is this different from Windows?

On Windows, each app makes its own folder in Program Files and manages its own files. On Linux, apps share a common structure -- all their executables go in one place, all their libraries go in another. This makes the system tidier, but it also means you don't see a "Firefox" folder you can just delete. Instead, you uninstall through the package manager.

System settings (/etc)

/etc (pronounced "et-see") is where all the system-wide settings live. Think of it as the Linux version of the Windows Registry, except instead of one giant confusing database, it's just a bunch of text files you can read and edit.

Some files you might encounter:

FileWhat it does
/etc/hostnameYour computer's name on the network
/etc/hostsManually map website names to addresses (like a local DNS)
/etc/fstabWhich drives to connect automatically at startup
/etc/passwdList of user accounts (don't worry, passwords aren't stored here in plain text)
You probably won't need to touch /etc. Most settings can be changed through your desktop's Settings app. These files are here for when you need fine-grained control or are following a specific guide.

Logs and changing data (/var)

This is where the system keeps data that changes over time -- logs of what happened, cached downloads, email, and so on.

The most useful subfolder is /var/log, which contains log files. If something goes wrong, this is where you (or someone helping you) would look for clues:

# See recent system messages
cat /var/log/syslog          # Ubuntu/Mint/Debian
cat /var/log/messages        # Fedora/RHEL

# Or use the built-in log viewer (works on most distros)
journalctl -b                # Show logs from this boot

USB drives and external storage (/media)

When you plug in a USB drive, external hard drive, or SD card, it shows up under /media/yourname/. Your file manager handles this automatically -- you'll see it pop up in the sidebar just like on Windows or Mac.

If you need to manually connect a drive (less common), you'd use the /mnt folder.

Temporary files (/tmp)

Programs create temporary files here while they're working. Everything in /tmp gets deleted when you restart your computer. You don't need to manage this -- it takes care of itself.

The "under the hood" folders

These folders are more advanced. You won't need them for everyday use, but it's good to know they exist.

/dev - Your hardware represented as files

Linux has an unusual design: it represents hardware devices as if they were files. Your hard drive is a "file" at /dev/sda. Your webcam, USB ports, even random number generators -- they're all "files" here.

You'll rarely interact with this directly, but you might see these paths mentioned in guides:

  • /dev/sda -- Your first hard drive
  • /dev/sda1 -- The first section (partition) of that drive
  • /dev/null -- A "black hole" file that discards anything written to it
/proc and /sys - Live system information

These aren't real folders on your hard drive. They're created on the fly by the operating system to show you what's happening right now -- kind of like Task Manager on Windows, but as files.

# How much memory you have
cat /proc/meminfo

# What CPU you have
cat /proc/cpuinfo

# How long your computer has been on
cat /proc/uptime
/boot - Startup files

Contains the files your computer needs to start up, including the Linux core (called the "kernel" -- it's the part that talks to your hardware). You should never need to edit anything here manually. Your package manager handles updates to these files.

/lib - Support files for programs

These are shared code libraries that programs need to run -- similar to .dll files on Windows. You don't manage these yourself; the package manager installs them when a program needs them.

File permissions (who can access what)

Every file on Linux has rules about who can read it, change it, or run it. There are three levels:

And three types of permission:

How to read permission codes

When you list files with details (ls -l), you'll see something like:

-rw-r--r--  1 you  you  2847 Jan 15 12:00 notes.txt

That -rw-r--r-- part breaks down like this:

  • rw- -- Owner can read and write (but not execute)
  • r-- -- Group can only read
  • r-- -- Everyone else can only read
Changing permissions

You can change who has access to a file with chmod:

# Make a script runnable
chmod +x my-script.sh

# Make a file private (only you can read/write)
chmod 600 private-file.txt

# Make a folder and everything in it accessible to your group
chmod -R 775 shared-folder/
Having permission problems? See troubleshooting

Quick comparison: Windows vs Linux

WindowsLinuxWhat it's for
C:\Users\You/home/youYour personal files
C:\Program Files/usr/bin and /optInstalled programs
C:\Windows/usr/lib and /bootOperating system files
Registry/etc (text files)System settings
D:\ (second drive)/media/you/DriveNameExtra storage
Recycle Bin~/.local/share/TrashDeleted files
%TEMP%/tmpTemporary files
Event Viewer/var/logSystem logs