What Are Absolute and Relative Path in Linux?
Contents

Where is absolute path in Linux?

You can get absolute path or full path of a file in Linux using readlink command with -f option. It is also possible to provide directory as the argument not just files.

What is a relative path Linux?

Relative path is defined as path related to the present working directory(pwd). Suppose I am located in /var/log and I want to change directory to /var/log/kernel. I can use relative path concept to change directory to kernel. changing directory to /var/log/kernel by using relative path concept.

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest