Share your love
Easy guide to Install Homebrew on Debian 11
In this guide, we want to teach you to Install Homebrew 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.
Now you can proceed to the following guide steps provided by the Orcacore team to Install Homebrew on Debian 11.
Table of Contents
Steps To Install Homebrew on Debian 11
To Install Homebrew on Debian 11, 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.
Now follow the steps below to complete the guide steps.
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 https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
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
Output
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...]
Troubleshooting:
brew config
brew doctor
brew install --verbose --debug FORMULA|CASK
Contributing:
brew create URL [--no-fetch]
brew edit [FORMULA|CASK...]
Further help:
brew commands
brew help [COMMAND]
man brew
https://docs.brew.sh
To verify that Homebrew is working correctly on Debian 11, run the following command:
brew
Output
Your system is ready to brew.
For more information, you can visit the Homebrew documentation page.
Conclusion
By following the steps outlined, you can successfully install Homebrew on Debian 11. Homebrew offers a streamlined way to manage packages on your Linux system, making software installation and management much easier.
Hope you enjoy it. Also, you may like these articles:
Install Security Updates on Debian 11
Install Flatpak Package Manager on Debian 11
FAQs
What is Homebrew?
Homebrew is a command-line package manager that simplifies software installation on Linux and macOS.
How do I install Homebrew on Debian 11?
Use the provided script via the terminal to install Homebrew on your Debian system.
What command adds Homebrew to the system path?
You can use eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
to add Homebrew to your system path.