We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Filepaths

The output of pwd is a filepath. A filepath is a string that describes the location of a file or directory on your computer. Here on Boot.dev, your home directory is always /home/user.

However, on your machine (we'll get to it later) it should look something like this:

Linux/Windows WSL

/home/wagslane
  • The first slash (/) represents the root directory. It's the tippy-top of the filesystem tree.
  • The next part (home) is the name of a directory inside the root directory.
  • Finally, the last part (wagslane) is the name of a directory inside the home directory.

So this path represents a directory 2 levels down from the root directory:

root
  └── home
        └── wagslane

macOS

/Users/wagslane
  • The first slash (/) represents the root directory. It's the tippy-top of the filesystem tree.
  • The next part (Users) is the name of a directory inside the root directory.
  • Finally, the last part (wagslane) is the name of a directory inside the Users directory.

So this path represents a directory 2 levels down from the root directory:

root
  └── Users
        └── wagslane

Linux Filepath

Click to play video

Assignment

Time to start digging for evidence. The ls ("list") command prints the contents of a directory. You can pass it a directory path as an argument to list that directory without moving into it.

The worldbanc project you'll use throughout this course is already on this machine, waiting in your home directory.

Submit the shell checks.