I've tried to do it both ways:

1. I edited ~/.bash_profile like so:

$ cat ~/.bash_profile
export PATH="${PATH};~/bin"
$ $ ls -l ~/.bash_profile 
-rw-r--r--  1 myuser  staff  202 Oct  1 16:57 /Users/myuser/.bash_profile

2. I edited /etc/paths like so:

$ cat /etc/paths

So now my path looks like this:

$ echo $PATH

But I still can't run the files I have in ~/bin:

$ ls -l ~/bin
total 8
-rwxr-xr-x  1 myuser  staff  38 Oct  1 13:44 dev
$ dev
bash: dev: command not found

I haven't restarted my Mac yet, but I opened a new terminal to do the above test. How can I get the files in ~/bin to work without having to type their full path?

  • 1
    I just did this, and It worked fine for me. I used ~/bin in my /etc/paths instead of my username. – At0mic Oct 1 '15 at 14:12
  • 1
    You have a typo there is a semi colon (not colon) in your path just before ~/bin - which is from your ~/.bash_profile - you have not tried the /etc/paths on its own – mmmmmm Oct 1 '15 at 14:14
  • @IronCraftMan: Yup. You can put that as the answer. – stackular Oct 1 '15 at 15:26

You must log in to answer this question.

Browse other questions tagged .