← All terms

Building a project

Relative path

A relative file path describes a location from a chosen starting folder, usually your shell's working directory. It does not start at the filesystem root. The same path text can point to different places when the starting folder changes.

You might see: relative file path, relative pathname

In a real project

From the reading-list folder, notes/ideas.txt names a file inside its notes folder. On macOS or Linux, ./ means the current folder and ../ means its parent. These shortcuts describe a route from where you are, not one universal address.

A common mistake

Pasting a relative path without checking its starting folder. A correct path from one directory may select the wrong file, or no file, when used from another.

Put it into practice

These lessons open through your account. Your kit determines which are available.

Go to the source

Sources checked .