In this tutorial, we will learn about absolute and relative paths in Linux.
The Linux file structure is a hierarchical structure and is like an inverted tree.
An absolute pathname of a file/directory is the path from the root directory(/). It is the complete path from the root directory listing all the intermediate directories.
The absolute path of the file in the Linux file structure will be unique. Any pathname that begins with the / or the ~ is an absolute pathname.
/ refers to the root directory
The ~ is the absolute path of the user’s home directory.
/home/testingdocs is the home directory for the user. /home/testingdocs/Desktop and ~/Desktop both are same.
A relative pathname is the path relative from the current working directory to the file.
../ is the parent directory
Linux Commands Tutorial page:
More Information on Ubuntu Linux: