The Academy

Loading the search index…

Searches the academy on this device only.

Folder hierarchies and file paths

See how folders nest inside each other like a tree, read a file path on Ubuntu and Windows, and find hidden files. You will be able to say exactly where any file lives.

25 minbeginnerUbuntu/LinuxWindowsPractical task needs a laptop or desktop

Marking a lesson as read does not prove you can do it. Skills count as demonstrated when you pass the quiz (not yet) and complete the practical tasks (not yet).

By the end of this lesson you will be able to

  • Draw a folder hierarchy as a tree, with parent and child folders.
  • Read an absolute file path on Ubuntu and on Windows and say what each part means.
  • Explain the difference between an absolute and a relative path.
  • Find your home folder and show hidden files in your file manager.

When you say 'my CV is in Documents, in the Jobs folder', you are describing a path without knowing it. Computers write the same idea in a precise, shorthand form, and you will meet that form in error messages, in the address bar and later in the terminal. Learning to read it now makes the rest of the academy easier.

Folders inside folders: the hierarchy

Folders can hold other folders, which can hold others again. The result is a file system shaped like an upside-down tree. At the very top is a single starting point called the root. Every other folder is a child of the folder that holds it, and the holder is its parent.

Each person who logs in gets a private area called the home folder. Your documents, pictures and downloads live there. On Ubuntu for a user called amina it is /home/amina. On Windows it is C:\Users\Amina. Inside it, both systems create ready-made folders such as Documents, Downloads, Pictures and Music.

Diagram

A typical home folder with a few sub-folders and files.

  • amina (home folder)
    • Documents
      • Jobschild of Documents
        • CV-Amina-2026.docx
      • Budget-2026.xlsx
    • Downloads
      • installer.zip
    • Pictures
      • Market-day
        • photo-001.jpg
A typical home folder with a few sub-folders and files.
Read this figure as text

A tree diagram of a home folder called amina containing Documents, Downloads and Pictures, with some files and folders inside.

The top folder is amina, the home folder. Inside it are three folders. Documents contains a folder called Jobs, which holds the file CV-Amina-2026.docx, and a file called Budget-2026.xlsx. Downloads contains installer.zip. Pictures contains a folder called Market-day, which holds photo-001.jpg. Jobs is a child of Documents, and Documents is the parent of Jobs.

A path is a set of directions

A path is the full address of a file: the list of folders to open, in order, ending with the file itself. It works like a postal address that goes from country to town to street to house number. Each folder name is separated from the next by a symbol: a forward slash / on Linux and a backslash \ on Windows.

The same file on the two systems
Ubuntu (Linux)Windows 11
Separator between folders/ (forward slash)\ (backslash)
Starting point/ (root of everything)A drive letter such as C:\
Home folder/home/aminaC:\Users\Amina
Example path/home/amina/Documents/Jobs/CV-Amina-2026.docxC:\Users\Amina\Documents\Jobs\CV-Amina-2026.docx
Capital lettersMatter: Jobs is not jobsDo not matter
Diagram

Reading a Linux path from left to right.

/RootTop of everything
homeFolderAll users
/aminaHome folderYour area
/DocumentsFolder
/JobsFolder
/CV-Amina-2026.docxThe file
Reading a Linux path from left to right.
Read this figure as text

The path /home/amina/Documents/Jobs/CV-Amina-2026.docx split into labelled parts from the root to the file.

The path /home/amina/Documents/Jobs/CV-Amina-2026.docx is read from left to right. The first slash is the root, the top of everything. Then home is the folder that holds all user home folders. amina is the home folder of one user. Documents and Jobs are folders inside it. CV-Amina-2026.docx at the end is the file itself.

Diagram

The same idea on Windows, with a drive letter and backslashes.

C:DriveStorage device
\UsersFolderAll users
\AminaHome folder
\DocumentsFolder
\JobsFolder
\CV-Amina-2026.docxThe file
The same idea on Windows, with a drive letter and backslashes.
Read this figure as text

The path C:\Users\Amina\Documents\Jobs\CV-Amina-2026.docx split into labelled parts from the drive to the file.

The Windows path C:\Users\Amina\Documents\Jobs\CV-Amina-2026.docx reads from left to right. C: is the drive letter, the storage device holding the files. Users is the folder that holds all user home folders. Amina is the home folder. Documents and Jobs are folders inside it. CV-Amina-2026.docx is the file. Backslashes separate the parts.

Absolute and relative paths

An absolute path starts at the very top (the root or the drive) and so means the same thing wherever you are, like a full postal address. A relative path starts from where you are now, like saying 'next door' or 'the second house on the left'. If you are already in /home/amina/Documents, the relative path to the CV is simply Jobs/CV-Amina-2026.docx.

On Linux the shorthand ~ stands for your home folder, so ~/Documents means /home/amina/Documents. Two dots .. mean 'the parent folder, one level up'. You will use these in the terminal later; for now it is enough to recognise them.

Hidden files

Some files are hidden so that you do not delete or alter them by accident. They are usually settings that programs keep. On Linux a name that starts with a dot, such as .config, is a hidden file. On Windows a file has a Hidden flag in its properties. Hiding is only a convenience for tidiness. It is not security, and it does not stop anyone from seeing the file if they ask to.

Find your home folder and show hidden files

On Ubuntu 24.04

  1. Step 1: Open your home folder

    Open Files and click Home in the sidebar.

    You should see: You see Documents, Downloads, Music, Pictures and other ready-made folders.

  2. Step 2: Show the path

    Press Ctrl and L.

    You should see: The address bar changes to text such as /home/amina, using your own user name. Press Escape to close it.

  3. Step 3: Show hidden files

    Press Ctrl and H. You can also use the menu button in the toolbar and switch on Show Hidden Files.

    You should see: Extra items beginning with a dot appear, such as .config or .local. Press Ctrl and H again to hide them.

Diagram

The same file written with an absolute and a relative path.

Absolute pathStarts at the root
  • /home/amina/Documents/Jobs/CV-Amina-2026.docx
  • Works from anywhere
  • Longer

A full postal address.

Relative pathStarts from where you are
  • Jobs/CV-Amina-2026.docx
  • Assumes you are in /home/amina/Documents
  • Shorter

Directions from here.

The same file written with an absolute and a relative path.
Read this figure as text

A comparison of an absolute path that starts at the root and a relative path that starts from the current folder.

Left column, Absolute path: /home/amina/Documents/Jobs/CV-Amina-2026.docx. It starts at the root, works from anywhere and is longer. Right column, Relative path: Jobs/CV-Amina-2026.docx. It starts from the current folder, which here is /home/amina/Documents, is shorter, but only works if you are in that folder.

Common mistakes

  • ✖ Instead of: Mixing up / and \ when writing a path.

    ✔ Do this: Linux uses /, Windows uses \. Check which system you are on before you type a path.

  • ✖ Instead of: Saving everything on the Desktop or in Downloads.

    ✔ Do this: Create folders inside Documents and keep related files together. The Desktop is for short-term items.

  • ✖ Instead of: Deleting hidden folders to 'clean up'.

    ✔ Do this: Leave them. They hold program settings, and removing them can reset or break programs.

If something goes wrong

I cannot find my file even though I saved it.
Use the search tool of your file manager (Lesson: Copying, moving, renaming and searching), or check Downloads and Recent files. The program may have saved to its default folder.
An error says the path is not found or the folder does not exist.
Check each part for spelling and capital letters (Linux cares), and for the right separator. Paste the path into the address bar to see where it stops working.
The hidden files I turned on are still showing the next day.
The setting is remembered. Switch it off the same way: Ctrl and H on Ubuntu, or untick Hidden items in the Windows View menu.

Key terms

Home folder
Your personal folder on Linux, where your own files and settings are kept.
Absolute path
The complete address of a file or folder, starting from the very top of the file system.
Relative path
A file location described starting from the folder you are in now.
Hidden file
A file or folder whose name begins with a dot, which ls does not show unless you ask with -a.
File path
The written route to a file through the folders that contain it.

Practise it for real

Reading is not the same as being able to do it. Complete these on your own computer, then tick only what you have actually done. These ticks are your own honest record: nothing checks them for you.

Guided exerciseNeeds a laptop or desktop

Draw and read your own tree

On your laptop, open your home folder and look two levels down. On paper, draw a tree with your home folder at the top, three of its folders beneath it, and at least one folder or file inside each. Write the absolute path of one file in your tree, then write its relative path from its parent's parent folder.

You have succeeded when:
Independent challenge

Challenge: path detective

Without opening any menus, answer from the table in this lesson: which of these paths are valid on Windows, which on Ubuntu, and which on neither? (a) /home/joseph/Pictures/trip.png (b) C:\Users\Joseph\Pictures\trip.png (c) C:/home\joseph/trip.png?. Then explain what is wrong with the third one.

You have succeeded when:

Knowledge check

6 questions. You need 80% to pass. Mistakes here are part of learning, and you can retry as often as you like.

  1. Question 1.What does the path C:\Users\Amina\Documents\Jobs\CV.docx describe?
  2. Question 2.Linux separates folder names in a path with a backslash.
  3. Question 3.Match each term to its meaning.
  4. Question 4.You are inside /home/amina/Documents. The file you want is at /home/amina/Documents/Jobs/CV-Amina-2026.docx.Which is a correct relative path to it from where you are?
  5. Question 5.Put these parts of /home/amina/Documents/notes.txt in the order you would open them, starting from the top.
    1. amina
    2. The root (/)
    3. home
    4. Documents
    5. notes.txt
  6. Question 6.What is true about hidden files?

Summary

  • Folders nest inside folders to form a tree with a root at the top.
  • A path lists the folders to open, in order, ending with the file.
  • Linux uses `/` and `/home/name`; Windows uses `\` and `C:\Users\Name`.
  • An absolute path starts at the top; a relative path starts from where you are.
  • Hidden files are settings kept out of sight: safe to show, unwise to delete.

Checklist: can you do these?

Marking a lesson as read does not prove you can do it. Skills count as demonstrated when you pass the quiz (not yet) and complete the practical tasks (not yet).

Related lessons

References and further reading

Official sources for details that can change between versions.

On this page