This preview shows page 1. Sign up to view the full content.
Unformatted text preview: nt variab les are modifiable parameters as s oc iated with a proc es s . W e
c an s ee the c ontents of environment variables by telling the s hell to ex pand them with the “$” s y mbol:
As y ou may have gues s ed, $PATH is the environment variab le that provides the s earc h path; it's ac tually multiple paths s eparated
by c olons . If we wanted to add to it, we c ould do s omething lik e this :
Now we c an run “binc alc ” by name. Try it. This environment won't be inherited by proc es s es that are launc hed, however, without
us ing an additional s hell b uilt in (program built into the s hell) c alled “ex port”:
Now all programs that we run in this s hell will als o be able to run binaries in ~ ec e190/bin by name. This c hange is s till ephemeral,
however, bec aus e as s oon as we c los e the terminal the s hell is terminated and its $PATH will be res et the nex t time we run it. To
modify the $PATH automatic ally on every s tartup of the s hell, y ou'll need to modify y our login s c ript, whic h is probably ~ /.bas hrc .
Sc ripts are s imply a lis t of c ommands for the s hell to run, one on eac h line. Ju...
View Full Document
- Fall '14