How To Install Homebrew on Debian 11

In this guide, we want to teach you to Install Homebrew or Brew on Debian 11.

Homebrew, also known as Brew, is a command line package manager primarily created for macOS.

Homebrew grew quite popular among macOS users as more developers created command-line tools that could be easily installed with Homebrew.

This popularity resulted in the creation of Linuxbrew, a Linux port for Homebrew. Since it is primarily Git and Ruby, and Linux and macOS are both Unix-like systems, Brew works well on both kinds of operating systems.

Steps To Install Homebrew on Debian 11

To complete this guide, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on Initial Server Setup with Debian 11.

Brew Installation on Debian 11

First, you need to update your local package index with the following command:

sudo apt update

Install build-essential and Git packages

Then, you need to install the build-essential package on your server. To do this run the command below:

sudo apt install build-essential -y

build-essential is what is called a meta-package. It in itself does not install anything. Instead, it is a link to several other packages that will be installed as dependencies.

Now you need to install git on Debian 11 with the following command:

sudo apt install git -y

Brew’s official website provides a script for downloading and installing Homebrew.

Download Homebrew Installer Script

You can download and run the Homebrew script with the following command:

/bin/bash -c "$(curl -fsSL"

This will take some time to complete.

When your Homebrew installation on Debian 11 is completed, you need to add the Brew command to the system path:

# echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/orca/.profile
# eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

The eval command is used to execute the arguments as a shell command on UNIX or Linux systems.

Then, you need to install GCC with the brew command on your server:

 brew install gcc

Start Brew on Debian 11

At this point, run the brew help to get started the Homebrew on Debian 11:

brew help
Example usage:
brew search TEXT|/REGEX/
brew info [FORMULA|CASK...]
brew install FORMULA|CASK...
brew update
brew upgrade [FORMULA|CASK...]
brew uninstall FORMULA|CASK...
brew list [FORMULA|CASK...]

brew config
brew doctor
brew install --verbose --debug FORMULA|CASK

brew create URL [--no-fetch]
brew edit [FORMULA|CASK...]

Further help:
brew commands
brew help [COMMAND]
man brew

To verify that Homebrew is working correctly on Debian 11, run the following command:

Your system is ready to brew.

For more information, you can visit the Homebrew documentation page.


At this point, you have learned to Install Homebrew (brew) on Debian 11.

Hope you enjoy it. Also, you may be like these articles on the orcacore website:

Install Security Updates on Debian 11

Install Flatpak Package Manager on Debian 11


Please enter your comment!
Please enter your name here

Latest Articles


Most Popular