Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am new to Ubuntu (coming from Windows 7) and I am trying to add a directory to my system path and for some reason I can't get it to work. I am using Ubuntu version 12.04 LTS

I tried following this article without success How to add a directory to my path?

Here are my steps:

  1. In my home directory I am editing the .profile file.
  2. Under the “# set PATH so it includes user's private bin if it exists” section I added the following:

    if [ -d "$HOME/bin" ] ; then 
       PATH="$HOME/bin:$PATH:home/vincent/google_appengine"  
    fi
    
  3. I logout and log back in.

  4. open the terminal window and type in:
vincent@ubuntu:~$ dev_appserver.py 
dev_appserver.py: command not found

The directory and files are in the location. What am I doing wrong?

share|improve this question

2 Answers 2

up vote 2 down vote accepted
  • The code between if and fi is only used if there's a directory bin in your home directory.
  • I needs to be /home/vincent/google_appengine instead of home/vincent/google_appengine

Use

PATH="$PATH:/home/vincent/google_appengine"  

outside any if...fi statement

share|improve this answer
    
That worked! Thanks for the answer! –  Zaffiro Jun 9 '12 at 0:41

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
share|improve this answer
    
+1 Thanks pl1nk! I tried the accepted answer the first time and it worked. –  Zaffiro Jun 9 '12 at 0:42
    
@Zaffiro - You are welcome, you were both posting at the same time :) –  pl1nk Jun 9 '12 at 0:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.