Share your love
Set up HomeBrew on AlmaLinux 9 | Easy Package Manager

This guide intends to teach you to Set up HomeBrew on AlmaLinux 9. Homebrew or Brew is an open-source software package manager that makes it easier to install software on macOS (Apple’s operating system) and Linux.
Basically, a package manager’s job is to find and install the right software packages that will allow you to compile and run various apps/software on your specific operating system. A package manager, like Homebrew, does a lot of tedious, time-consuming work that you would otherwise have to do manually.
You can now follow the steps below on the Orcacore website to install Brew package manager on AlmaLinux 9.
Table of Contents
Steps To Set up HomeBrew on AlmaLinux 9
To install Brew package manager on AlmaLinux 9, 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 AlmaLinux 9.
1. Install Brew Package Manager on AlmaLinux 9
First, you need to update your local package index with the following command:
sudo dnf update -y
Then, you need to install Git on your server by using the following command:
sudo dnf install git -y
Also, you need to install the Development tools on your server with the command below:
sudo dnf groupinstall 'Development Tools' -y
2. Download HomeBrew Installer Script
At this point, you need to download the HomeBrew installer script on AlmaLinux 9 by using the curl command:
/bin/bash -c "$(sudo curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
This command will take some time to complete.
3. Add Brew to System Path
When your Brew installation on AlmaLinux 9 is completed, you need to add the Brew command to the system path. To do this, you can run the following commands:
# echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/reita/.bash_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.
4. Start Brew on AlmaLinux 9
Now run the brew help to get started with Homebrew on AlmaLinux 9:
brew help

To verify that Homebrew is working correctly on AlmaLinux 9, run the following command:
brew doctor

For more information, you can visit the Homebrew documentation page.
5. Uninstall HomeBrew on AlmaLinux 9
To uninstall Homebrew from your server, you can download the “uninstall” script to your server and run it:
curl -fsSL -o uninstall.sh https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh
After reviewing the script contents, run this script to uninstall Homebrew:
bash uninstall.sh
Conclusion
At this point, you have learned to Set up and Install HomeBrew or Brew on AlmaLinux 9. Homebrew simplifies package management by allowing easy installation of software not included in AlmaLinux repositories. Also, it provides up-to-date and user-friendly tools for developers and system administrators.
Hope you enjoy it. You may also be interested in these articles:
Install Rust Programming Language on AlmaLinux 9
How To Install Yarn on Rocky Linux 8
Upgrade Linux Kernel on AlmaLinux 8
Best Linux Desktop Distros for Teams to Access Remotely
Install Python 3.13 on AlmaLinux
FAQs
What is Homebrew?
Homebrew is a package manager that simplifies software installation on Linux and macOS.
Why use Homebrew instead of dnf?
Homebrew provides newer versions of software and packages that may not be available in the default AlmaLinux repositories.
Where does Homebrew install packages?
By default, it installs packages in the /home/linuxbrew/.linuxbrew/
.
How do I update Homebrew and installed packages?
You can use the commands below: brew update && brew upgrade