TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Linux

Absolute and Relative Paths

Overview

In this tutorial, we will learn about absolute and relative paths in Linux.

Absolute Path

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.

 

Linux File System TestingDocs

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.

Examples

/  refers to the root directory

/home/testingdocs/Desktop

~/Desktop

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. 

Absolute Pathname Linux

Relative Path

A relative pathname is the path relative from the current working directory to the file.

Examples

../ is the parent directory

../testingdocs

../../etc

Relative pathname working directory

—

Linux Commands Tutorial page:

https://www.testingdocs.com/linux-basic-commands-tutorial/

More Information on Ubuntu Linux:
https://ubuntu.com/

Related Posts

Android Studio Setup Wizard

Linux /

Customization of Android Development Environment

Download Android Studio

Linux /

Download Android Studio Package on Linux

gedit Text Editor Ubuntu

Linux /

gedit Text Editor in Linux

Download Ubuntu Desktop

Linux /

Create Ubuntu Bootable USB Pendrive on Windows

Linux /

Linux Files

‹ Linux Filenames & File extensions› GNU General Public License

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version