Linux Absolute and Relative PathsIt is very important to know the difference between absolute and relative path. Because correct path will only lead you to your destination directory. When you define a path starting with a slash ('/') sign, then root of the file is assumed. If you don't put a '/' then the current directory is assumed to be the starting point. In below example, we're at /home/sssit. To go to home directory we typed cd /home instead of cd home. Below you can see that we're getting an error by typing cd /sssit instead of cd sssit, because sssit is a sub-directory of home and hence it can't be accessed with a root ('/'). If currently you are in the root directory, then you can give command home or /home. Both will lead you to the home directory because you are already on the root directory.
Next TopicLinux Path Completion
|