Understand Linux absolute pathname


Understand Linux absolute pathname.


   What is Linux absolute pathnames all about? The absolute pathname is where you always specify full path name to execute command or program that start from the system root directory ( / ).  To understand Linux absolute pathname, see command example below that use absolute pathname in their example.


Linux pwd command show absolute pathname to user home directory.

show absolute pathname

[fedora11@fedora11 ~]$ pwd

/home/fedora11    <= show absolute pathname to your home directory

[fedora11@fedora11 ~]$


By specify directory absolute pathname, no matter where you are or which directory you are in on the system, the absolute path would take you straight to directory that you intend to go.

directory absolute pathname

[root@fedora11 ~]# cd /etc/sysconfig/
[root@fedora11 sysconfig]# pwd
[root@fedora11 sysconfig]#

View contents of passwd file in by specifying the absolute path names to the file.

Specify file absolute pathname

[root@fedora11 ~]# cat /etc/passwd


Execute ls command by specify absolute path to the Linux command.

Specify Linux commnad pathname

[root@fedora11 ~]# /bin/ls /

bin   etc   lost+found  opt   sbin     sys  var

boot  home  media       proc  selinux  tmp

dev   lib   mnt         root  srv      usr

[root@fedora11 ~]#


Note: Remember that Linux absolute pathname always begin/start from the root directory ( / ).


Keywords: understand linux absolute pathname, linux absolute pathname, linux absolute path, absolute pathname, absolute path