Loading Depth Study
Preparing your workspace
An absolute path describes a location from the filesystem root, while a relative path describes a location from the current directory.
Paths tell commands and programs where files or directories are located. An absolute path starts from the root and does not depend on the current directory. A relative path is interpreted from the current working directory. Special symbols such as . for the current directory, .. for the parent directory, and ~ for the user's home directory make navigation easier.
A script may use a relative path to read a config file located next to the script, while a system command may use an absolute path to a specific file.
/home/dev/projects/app/src/index.js ./src/index.js ../config.env ~/projects
The examples demonstrate absolute and relative paths from different starting locations.