1

This is probably easy, but I don't know how to set it for all users.

So, when I run:

which php

it shows

/usr/local/php5-7.2.0-20171215-181251/bin/php

However I've just installed PHP using brew on MacOS Mojave and I would like now also in command line to point PHP to some other directory (/usr/local/Cellar/php/7.2.10/bin/php). How can I do it for all system users?

  • So they all use the same shell? Also homebrew is designed to be run as the user that installed it will it run for other users? – Mark Sep 29 '18 at 10:02
  • Yes, all users use same shell. I just want to alias php so on whatever user I run php command it will run in fact /usr/local/Cellar/php/7.2.10/bin/php and not /usr/local/php5-7.2.0-20171215-181251/bin/php but I don't want to manually create aliases for all users – Marcin Nabiałek Sep 29 '18 at 10:26

You must log in to answer this question.

Browse other questions tagged .