Click here to navigate the course.

Drag the edges to resize the window.

In Projects, you can keep track of your progress as you go throught the tasks. Check each item as you complete it!

Terminal
Learn

What happens when you type this command?

$ echo $PATH /home/ccuser/.gem/ruby/2.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin

PATH is an environment variable that stores a list of directories separated by a colon. Looking carefully, echo $PATH lists the following directories:

  1. /home/ccuser/.gem/ruby/2.0.0/bin
  2. /usr/local/sbin
  3. /usr/local/bin
  4. /usr/bin
  5. /usr/sbin
  6. /sbin
  7. /bin

Each directory contains scripts for the command line to execute. The PATH variable simply lists which directories contain scripts.

For example, many commands we've learned are scripts stored in the /bin directory.

/bin/pwd

This is the script that is executed when you type the pwd command.

/bin/ls

This is the script that is executed when you type the ls command.

In advanced cases, you can customize the PATH variable when adding scripts of your own.

Report a Bug
If you see a bug or any other issue with this page, please report it here.