An absolute pathname begins with a slash (/). The Absolute path defines the location of a Directory or a file from the root file system (/). The absolute path contains the full path to the directory or file.
Examples of Absolute Path
/usr/share/doc (Absolute path for a Directory) /usr/share/doc/bash/README (Absolute path for a Directory)
Question: List the directory which contains all docs by using Absolute path.
# ls /usr/share/doc/
The relative pathname does not begin with /. It specifies the location relative to your current working directory. Below are some examples of relative pathnames, relative to particular directories.
|Current Directory||Relative Pathname|
You can Face one question in your Technical Interview on this topic..i.e What is the difference between absolute & relative pathnames in Linux?