Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
I often run brew update followed by brew upgrade.
Can I do that in one step?
Yes, by putting the following line in your ~/.bash_profile file:
alias brewu='brew update && brew upgrade --lock'
brewu can be replaced by whatever alias you want to use.