$PATH

 $PATH

A lightning talk breaking down the $PATH variable.

04c8d2026273e27d74b003c18c3b8261?s=128

Kim Schlesinger

November 20, 2018
Tweet

Transcript

  1. ⚡ $PATH kimschles 1

  2. ! echo $PATH kimschles 2

  3. /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin • Environment Variable • 1 long string • Colon-separated

    • Is a path to executable code invoked through text commands kimschles 3
  4. /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin /usr/local/bin /usr/bin /bin /usr/sbin /sbin kimschles 4

  5. Editing $PATH kimschles 5

  6. Permanent Change Add to .bashrc or right from the command

    line. export PATH=$PATH:/Library/Frameworks/Python.framework/ Versions/3.5/bin kimschles 6
  7. Temporary Change From the command line. Only lasts in current

    shell (no export) PATH=$PATH:/Library/Frameworks/Python.framework/Versions/ 3.5/bin kimschles 7
  8. Recapitulation • Environment Variable • 1 long string • Colon-separated

    • Is a path to executable code invoked through text commands kimschles 8
  9. Recapitulation • See it with echo $PATH • Change it

    with export: export PATH=$PATH:/Library/Frameworks/new/thing • Try out a new path by taking out export: PATH=$PATH:/Library/Frameworks/new/thing kimschles 9
  10. Resources • How to Access and Edit Path • The

    /bin Directory kimschles 10
  11. kimschlesinger.com hirediversity.us kimschles 11