Relative and Absolute Paths

When changing directories, you can specify exactly where you want to go by specifying the correct path. As mentioned earlier in the lesson, a path is the shortest set of directories through which you must travel from the root directory to get to the current file or directory. Unix, however, has two different types of path statements that you absolutely need to be familiar with in order to completely understand how to navigate the system.

The two types of path statements in Unix are relative path statements and absolute path statements. Paths starting with the root directory and ending in a file or directory name are called absolute paths. In other words, absolute paths have absolutely everything contained within them, ...

Get SAMS Teach Yourself Unix in 10 Minutes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.