2

So I've been using ubuntu since 09.04 but have limited experience with sys admin. I now want to get into web development and as part of installing the Play Framework, I had to add the activator path to $PATH.

After plenty of research it still wasn't working, I had tried adding

export PATH=$PATH:/home/Play/...

to both .bashrc and .profile and although both scripts were adding the directory to $PATH, as seen using

$echo $PATH

I was still seeing "command not found" when trying to run activator commands

More by luck than anything else I amended the script to read

export PATH=$PATH:~/Play/...

and lo and behold, it worked.

Questions:

  • Why would the script not recognise "/home/" but recognise "~/" (my home drive is on a separate partition if that explains it) and could this be indicative of a bigger problem with my installation? [Edit: Solved! as pointed out in comments below, this is because ~/ points to /home/username/ and not just /home/]
  • I have left this script in .bashrc, is this the best place for it as including it in .profile seemed to do the same thing?
4
  • 5
    Your home directory is probably not /home/, it's probably something like /home/sibow/. Do this to see for yourself: echo ~ and ls /home Jan 9, 2015 at 14:42
  • @glennjackman make that an answer, you're most likely right.
    – roadmr
    Jan 9, 2015 at 15:04
  • @glennjackman: If you don't make it an answer, I will! :P ;-)
    – Fabby
    Jan 10, 2015 at 10:29
  • Go for it. It's only the first part anyway. Jan 10, 2015 at 16:18

1 Answer 1

2

Your home directory is probably not /home/, it's probably something like /home/sibow/. Do this to see for yourself: echo ~ and ls /home

glenn jackman Jan 10 '15 at 14:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .