2
1
In my ~/.bashrc
, I have several aliases like:
alias emacs='/Applications/Aquamacs.app/Contents/MacOS/Aquamacs'
alias octave='/Applications/Octave.app/Contents/Resources/bin/octave'
alias wine='/Applications/Wine.app/Contents/Resources/bin/wine'
alias simion='wine "/Users/hpek/.wine/drive_c/Program Files/SIMION 8.0/simion.exe"'
alias inkscape='wine "/Users/hpek/.wine/drive_c/Program Files/Inkscape/inkscape.exe"'
I do not think that this is the right way to do it. The aliases does not work from within bash scripts, and when installing something through brew
or apt-get
, it does not create an alias like this.
What is the correct way to do this?
Is that how homebrew/apt-get does it? where are these links? echo $PATH gives: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/texbin:/usr/X11/bin What would be a good place for these links? – hpekristiansen – 2012-02-05T21:34:02.923
1@Hans-PeterE.Kristiansen Homebrew/apt-get install to these directories, usually
/usr/bin
or/usr/local/bin
. Homebrew creates/usr/local/bin
and adds it to the PATH, so you can run the programs without typing their full name. With Homebrew, there's some additional link creation going on as well, so in that regard it's similar. I'd place the links in/usr/bin
(as shown in the example) or/usr/local/bin
, since you already have it. It's possible you need to prefix theln
command withsudo
to be able to write to these directories. – Daniel Beck – 2012-02-05T21:38:17.870@Hans-PeterE.Kristiansen You won't see Homebrew installed programs in
/Applications
. They are stored in subdirectories of/usr/local
. Run/usr/local/bin
to see the links created for them. – Daniel Beck – 2012-02-05T21:46:13.457