{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

unix_path - The PATH Variable After reading this document...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
The PATH Variable After reading this document, you should know what the PATH variable is, how to set it, and how to view the directories currently therein. Motivation Consider the following UNIX terminal session: [email protected][~]$ ls ... When you type the command ls , the shell dutifully executes the command and returns the results to you. During the course of a terminal session, you type more commands. These include things like emacs , firefox , so on and so forth. But where do these commands come from? Obviously, they're included when you install the operating system, but where are they? The UNIX command which will tell you the full path to a binary it's about to execute. For example: [email protected][~]$ which ls /bin/ls That means that the exectuable for the command ls is located in /bin . Alternatively, to run ls , you can type in the full path to the command: [email protected][~]$ /bin/ls ... It seems like there's a bit of magic going on here, however. How does the system know that ls is in /bin ? The way the system knows is the PATH environment variable!
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern