Where is the bin?



I’m trying to add a file named jel.py to my PATH so I don’t have to type ./jel.py -help whenever I want to run a jel command. How would I do this?


I like to create a bin folder in my home directory for local executables. You can also place files in /usr/local/bin. You may need to use sudo to add your file there.


echo $PATH
Will show all current paths to bins, you can place your script in any of those.

The better option would be to run this
export PATH=$PATH:$HOME/bin

And place your scripts in ~/bin


@vasilenko93 Should I create a folder called ~/bin or just bin?


mkdir ~/bin should work just fine.


Ok, I put the bin folder in mkdir ~ and then tried to execute jel -help and it didn’t work. It gave me: bash: jel: command not found


Hmm, does your path show up in echo $PATH? If it does, than check permissions are set correctly. Plus isn’t your file called jel.py not jel?

bjskistad:~/workspace (master) $ echo $PATH

Ran that. Nope. Not there. (And yes, my file is jel.py) Do I need to run chmod +x jel.py?


Strange, I just followed the following steps and I was able to run a script that is inside ~/bin

  1. Create new folder in home directory called bin: mkdir ~/bin
  2. Update my PATH variable: export PATH=$PATH:$HOME/bin
  3. Create a script and move it to bin: mv script.sh ~/bin/script.sh
  4. Give the script executable permissions: chmod 755 ~/bin/script.sh or chmod +x ~/bin/script.sh
  5. Run script from anywhere script.sh

bjskistad:~/workspace (master) $ mv jel.py ~/bin/jel.py
mv: cannot move ‘jel.py’ to ‘/home/ubuntu/bin/jel.py’: No such file or directory


@vasilenko93 I solved it. I used sudo.