Homebrew on M1/M2 macOS

First, install Homebrew – https://brew.sh/

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Authenticate when prompted to. Edit/create bin paths in the .zshrc file. In the home directory run the command

nano .zshrc

then add these lines in. (The last line is my local bin – my little reminder).

export PATH=/opt/homebrew/bin:$PATH
export PATH=/opt/homebrew/sbin:$PATH
export PATH=~/bin:$PATH 

Save and exit. Then restart the terminal, or you can log out and log in. Now you can run these commands and wait some time. Easy, fast, and effective.

Do you need other applications? Found it here https://brew.sh. Don’t you need some application that I have in the command? Remove it from the list before running it.

brew install cask coreutils terminal-notifier hudochenkov/sshpass/sshpass unzip p7zip rename imagemagick ncftp alerter node
brew install --cask sublime-text codekit dash fork iina ealeksandrov-cd-to deepl iterm2 free-download-manager gimp inkscape libreoffice audacity itsycal bartender typeface birdfont google-web-designer optimage scapple freemind viscosity sigil mamp camtasia maccy ukelele dbeaver-community firefox opera bettertouchtool expressions timemator whatsapp spotify appcleaner paparazzi imageoptim colour-contrast-analyser skype keka istat-menus typora waltr-pro anydesk teamviewer docker

The best of this solution is the fact, that you can update all these apps from the terminal. Use commands

brew update && brew upgrade && brew upgrade --cask

…and wait. Brew does everything for you.

If you sometimes use the built-in upgrade mechanism of some apps, you can run this command to be sure, that all brew way installed apps will be up to date:

brew upgrade --cask --greedy

In a one-line command, it would be like this

brew update && brew upgrade && brew upgrade --cask --greedy && brew cleanup