-1

I have Nano installed as part of the Monterey install plus I have downloaded Nano with Homebrew. Now, I have 2 versions of Nanos:

~|⇒ where nano
/opt/homebrew/bin/nano
/usr/bin/nano

If I type "Nano" it goes to the binary which is located under /bin/

~|⇒ which nano
/usr/bin/nano

Is there a way I could tell my shell to use the binary that I installed with Homebrew and resides at /opt/homebrew/bin/nano when I type Nano? Instead of the one that came with the OS. I would like to avoid deleting the binary under bin. Not sure which mapping/pointing or linking service is responsible for this path mapping.

vboxer00
  • 113
  • 7
  • 2
    It just takes the first one it finds. So in your `$PATH` configuration, simply put `/opt/homebrew/bin/` before `/usr/bin`. – matt May 08 '22 at 18:36
  • You can also define an alias : `alias nano=/opt/homebrew/bin/nano`, and put it in your ~/.zshrc – Philippe May 08 '22 at 18:39
  • Thanks! It was the $PATH that had to be changed. Also, my issue was related to this https://stackoverflow.com/questions/65487249/getting-a-warning-when-installing-homebrew-on-macos-big-sur-m1-chip – vboxer00 May 09 '22 at 14:07

0 Answers0