I am relatively new to Linux and Unix. With the help of the Internet, I finally understood how $PATH and aliases in my .bashrc work.
But I really could not find anything that describes when to use.
Say I installed Python3.3 in Library / Frameworks, and the executable is /Library/Frameworks/Python.framework/Versions/3.3/bin/python3 , but I want to execute python 3.3 just by typing python3 into my terminal.
When I understand this correctly, there are (at least) three methods for achieving this:
1) I change $ PATH in my .bashrc:
export PATH=/Library/Frameworks/Python.framework/Versions/3.3/bin:${PATH}
2) I set an alias in my .bashrc:
alias python3=/Library/Frameworks/Python.framework/Versions/3.3/bin
3) creating a symbolic link (symbolic link):
ln -s /Library/Frameworks/Python.framework/Versions/3.3/bin /usr/local/bin
What would you say (in your experience) the “recommended” way?
user2015601
source share