Absolute and relative path

An absolute path starts at the root (/home/alex/site), a relative path starts where you are (site/public).

Also called: path, root /

Type
Term
Source
General
Language
Bash

In plain English

Scripts and cron jobs should use absolute paths, because they don't start in the folder you expect.

Example

The cron job failed because the script used a relative path; with the absolute path it works.

In code

/home/user/domains/example.com/public_html   # absolute
../public_html                                      # relative

Learn more

Related terms

Added 2026-11-30 · Last reviewed 2026-11-30