Adding a Directory to a Path in .profile
Solution 1:
- The code in the
if
statement is only used if there's a directory$HOME/bin
is a directory - I needs to be
/home/vincent/google_appengine
instead ofhome/vincent/google_appengine
or (even better)$HOME/google_appengine
becausehome
is relative and/home
is absolute.
Use
export PATH="$PATH:$HOME/google_appengine"
Remember anything in the $PATH
before google_appengine
will override it.
Solution 2:
Add this line at the end of .profile(or not inside an if statement):
export PATH=$PATH:/home/vincent/google_appengine
Example .profile :
.
.
export LC_COLLATE="en_US.UTF-8"
export PATH=$PATH:/home/vincent/google_appengine