5.1 Path and home directory

  • The path of a file/directory is its location/address in the file system.

  • Your home directory is the one that hosts the user (your) data: it is similar, although not identical, in all operating systems, for example:

    • /users/sbonnin or /home/sbonnin (Linux)
    • /Users/sbonnin or /Home/sbonnin (macOS)
    • C:\Users\sbonnin or C:\Home\sbonnin (Windows)

The starting “/” or “\” is called the root directory. Directories branch downwards from the root directory, and can contain both files and subdirectories.

In the examples above, sbonnin is a subdirectory of users (or Users), and users starts at the root.

Example of a tree / organization of directories:

rstudio logo