**Homebrew makes it possible to install UNIX tools on macOS or Linux simply and flexibly. Homebrew's logo is a glass of beer with an apple. A very creative idea by the developers!** 

<figure class="">
  <img src="/assets/img/blog/2023-01-17-homebrew-package-manager/header_img.webp"
       alt="A beer glass"><figcaption>
      Generated with AI

    </figcaption></figure>


The Package Manager is written in the Ruby programming language. Homebrew is very resource-efficient, because it mainly uses programs and services that are already available on macOS or Linux.

<div class="ad-banner" style="margin-bottom: 0.7rem;">
    <hr class="hr-text" data-content="Advertisement*">
    <a href="/out/elevenlabs/" target="_blank" rel="sponsored nofollow noopener"><img src="../../assets/img/ads/elevenlabs.webp" alt="ElevenLabs Partner*" nopin="nopin"></a>
    <small style="display: block; margin-bottom: 0.5rem; margin-top: 0.5rem;"><strong>✨ Read without banner ads? </strong><a href="https://steady.page/en/tinztwins-hub/about" target="_blank" rel="noopener">Become a member</a> or <a href="https://steady.page/en/log_in?publication=tinztwins-hub" target="_blank" rel="noopener">log in</a></small>
</div>

We show you how to install Homebrew on your system. Furthermore, we also demonstrate to you how to use Homebrew. Finally, we give you a few tips for using Homebrew.   

The steps are the following:

1. Installation of Homebrew
2. Install your first UNIX tool
3. Install a MacOS App via cask
4. Practical tips
5. Conclusion

<div class="ad-banner" style="margin-bottom: 0.7rem;">
    <hr class="hr-text" data-content="Explore our premium blog articles">
    <a href="https://tinztwinshub.com/membership"><img src="../../assets/img/ads/premium_2.webp" alt="Explore our premium blog articles" nopin="nopin"></a>
    <small style="display: block; margin-bottom: 0.5rem; margin-top: 0.5rem;"><strong>✨ Read without banner ads? </strong><a href="https://steady.page/en/tinztwins-hub/about" target="_blank" rel="noopener">Become a member</a> or <a href="https://steady.page/en/log_in?publication=tinztwins-hub" target="_blank" rel="noopener">log in</a></small>
</div>

## Installation of Homebrew
You can install Homebrew with a command in the macOS terminal. There are other [installation options](https://docs.brew.sh/Installation){:target="_blank" rel="noopener"} that you can read about if you are interested.  

**Install Homebrew with the following command:**

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

Homebrew uses the command line tools of Apple's Xcode development environment. You can install Command Line Tools (CLT) for Xcode with the following command:

```bash
xcode-select --install
```

<div class="ad-banner" style="margin-bottom: 0.7rem;">
    <hr class="hr-text" data-content="Advertisement*">
    <a href="/out/elevenlabs/" target="_blank" rel="sponsored nofollow noopener"><img src="../../assets/img/ads/elevenlabs.webp" alt="ElevenLabs Partner*" nopin="nopin"></a>
    <small style="display: block; margin-bottom: 0.5rem; margin-top: 0.5rem;"><strong>✨ Read without banner ads? </strong><a href="https://steady.page/en/tinztwins-hub/about" target="_blank" rel="noopener">Become a member</a> or <a href="https://steady.page/en/log_in?publication=tinztwins-hub" target="_blank" rel="noopener">log in</a></small>
</div>

Homebrew installs packages to their own directory. Then Homebrew links the files in /usr/local for macOS Intel and /opt/homebrew for Apple Silicon. For this reason, you do not need sudo after the initial Homebrew installation if you use brew install. 

There is also a completion definition for the brew command. Some packages also provide completion definitions for their own programs. Homebrew currently supports zsh, bash and fish. You can find more information at [Shell completion](https://docs.brew.sh/Shell-Completion){:target="_blank" rel="noopener"}.

<div class="ad-banner" style="margin-bottom: 0.7rem;">
    <hr class="hr-text" data-content="Advertisement*">
    <a href="/out/castmagic/" target="_blank" rel="sponsored nofollow noopener"><img src="../../assets/img/ads/castmagic.webp" alt="CastMagic Partner*" nopin="nopin"></a>
    <small style="display: block; margin-bottom: 0.5rem; margin-top: 0.5rem;"><strong>✨ Read without banner ads? </strong><a href="https://steady.page/en/tinztwins-hub/about" target="_blank" rel="noopener">Become a member</a> or <a href="https://steady.page/en/log_in?publication=tinztwins-hub" target="_blank" rel="noopener">log in</a></small>
</div>

## Install your first UNIX tool

You can install UNIX tools via Homebrew Formulae. Under [Homebrew Formulae](https://formulae.brew.sh/formula/){:target="_blank" rel="noopener"}, you can search for UNIX tools. Try it out!

**Installation of htop:**

```bash
brew install htop
```

htop is a system resource monitor for the command line. htop is based on 'top' but provides a nicer visual display of process activity, CPU activity, memory usage, average load and process management.

## Install a macOS App via cask

With Homebrew Cask, you can install macOS apps, fonts, plugins and other non-open source software. You can search for them via [Homebrew Cask](https://formulae.brew.sh/cask/){:target="_blank" rel="noopener"}.

**Installation of Google Chrome app:**

```bash
brew install --cask google-chrome
```

Right! You can also install Google Chrome via Homebrew. The advantage is that you can update the application via brew.

## Practical tips
Homebrew takes a lot of the work out of package management. The most important commands can be found in the [Homebrew Documentation](https://docs.brew.sh/Manpage){:target="_blank" rel="noopener"}. Now we give you three more tips.

### Tip 1
We recommend that you only use Homebrew as a package manager. Other package managers could lead to conflicts. You should also install all UNIX tools via Homebrew to have an overview of your UNIX tools.

**Overview of all packages:**

```bash
# list all installed packages
brew list --formula
```

**The installation command is always as follows:**

```bash
# replace <package_name> with the name of your package
brew install <package_name>
```

### Tip 2
You should install as many macOS apps as possible via Homebrew. An overview of all apps you get with the following command.

**Overview of all apps:**

```bash
# list all installed macOS apps
brew list --cask
```

**The installation command is always as follows:**

```bash
# replace <app_name> with the name of your app
brew install --cask <app_name>
```

### Tip 3
You can use Homebrew to keep all your packages and apps up to date with one command. This procedure takes a lot of work off your hands. In practice, you can do this command once a week.

**Upgrade all packages and apps:**

```bash
# upgrade all installed packages and apps
$ brew upgrade
```

**Note:** Homebrew does not support different package versions. For this reason, when a new package is installed, old packages are sometimes also upgraded. So don't be surprised!

## Conclusion
This article has shown you how to use Homebrew. You can now install packages and apps via Homebrew. We have also given you some practical tips.

<div class="ad-banner">
  <hr>
  💡 Do you enjoy our content and want to read super-detailed guides about AI Engineering? If so, be sure to check out our premium offer!

  <div style="text-align: center; margin-top: 0.7rem;">
    <a href="https://steady.page/en/tinztwins-hub/about" class="btn btn--primary">Unlock Premium</a>      
  </div>
</div>

<div class="ad-banner">
    <hr class="hr-text" data-content="Our Merch Shop">
    <a href="https://shop.tinztwinshub.com/merch/"><img src="../../assets/img/ads/ai_and_coding_merch.webp" alt="AI and Coding Merch" nopin="nopin"></a>
    <small style="display: block; margin-bottom: 0.5rem; margin-top: 0.5rem;"><strong>✨ Read without banner ads? </strong><a href="https://steady.page/en/tinztwins-hub/about" target="_blank" rel="noopener">Become a member</a> or <a href="https://steady.page/en/log_in?publication=tinztwins-hub" target="_blank" rel="noopener">log in</a></small>
</div>