≡ Menu

UNIX / Linux: Absolute Pathnames

Q. Can you explain the term absolute pathname under UNIX or Linux oses?

A. An absolute pathname, is the location of a filesystem object relative to the root directory. All absolute pathnames always begin with a slash (/). With Absolute pathname you have access to complete file system objects such as directories and files.

Absolute Pathnames

You can use absolute pathnames to specify full file path such as /etc/passwd. It is believed that UNIX pathname looks and feels like Internet addresses, thus result into compatibility. The absolute pathname of the current directory can be found by using the pwd command:
pwd

Absolute Pathnames Examples

Try following commands:
pwd
ls /etc
ls /usr/share/games
cd /usr/share/games
pwd
cd ~
pwd
cat /etc/passwd
cp /etc/passwd /tmp
cd /tmp
pwd
cat passwd

Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?

{ 2 comments… add one }

  • Rishik Bharti August 25, 2012, 12:48 pm

    nice ..i got satisfied answer,, thanks to all of you.

  • Sandeep Gulia May 5, 2013, 6:06 pm

    Good explanation..with Examples
    Regards,
    Sandeep Gulia

Leave a Comment