Fedora Silverblue’s immutable design is incredible for system stability, but layering every minor command-line utility via rpm-ostree gets tiring quickly due to the “reboot tax.”
Setting up Homebrew (Linuxbrew) is the perfect workaround. Because Silverblue’s root filesystem is read-only, Homebrew installs everything entirely inside your user directory (or the dedicated linuxbrew prefix under /home). This keeps your base operating system pristine, allows you to get instant package updates, and eliminates the need to reboot every time you want to install a new CLI tool.
Here is exactly how to set it up on a standard Silverblue installation. I use this on Silverblue so gh, language toolchains, and one-off CLIs never touch the ostree. For VMs on the same host, layer QEMU instead of brewing a hypervisor: Setting Up Virtualization on Fedora Silverblue. For an immutable server appliance, I still want CoreOS + Quadlets, not Homebrew: Beginner’s Guide to Fedora CoreOS.
When Homebrew is the right layer (and when it is not)
Use brew for: CLI tools you update often, language version managers, utilities that are newer in Homebrew than in Fedora’s repos, experiments you want to delete with brew uninstall.
Do not use brew for: kernel modules, libvirt/qemu, GPU drivers, or anything that must run as a system service at boot. Those belong in rpm-ostree, a privileged container, or a VM. Homebrew on Linux is a user-space prefix, not a second OS.
Never sudo brew. The installer will shout this. Listen.
Prerequisites
- Fedora Silverblue (this was written against a current Silverblue; the
/var/homelayout has been true for years). - A user with sudo for the one ostree layer (
gcc,make). - Network for GitHub.
- Git is already in the Silverblue base image. Do not layer
git/git-core“because the Linuxbrew docs said so.”
Check that you are actually on Silverblue:
cat /usr/lib/os-release | grep -E 'VARIANT|NAME'
ls -ld /home /var/home
You should see /home as a symlink into /var/home. That symlink is why copy-pasted Ubuntu brew PATH lines sometimes lie.
Step 1: Install the compile dependencies
Before installing Homebrew, you need standard development tools (gcc and make) so Brew can compile packages from source when pre-built binaries aren’t available.
While standard Fedora documentation tells you to install git-core, Fedora Silverblue already includes Git in the base image. Attempting to install it will throw a conflict error.
To layer only what you need, run the following command in your terminal:
rpm-ostree install gcc make
Expected output: ostree downloads, then “Changes queued… reboot.” Check:
rpm-ostree status
The pending deployment should list gcc and make as layered packages. Once the packages have finished staging, reboot your system to apply the changes:
systemctl reboot
After reboot, confirm the compilers exist on the host (not only inside a toolbox):
command -v gcc make
gcc --version
If gcc is missing, you are still in the old deployment (rpm-ostree status will show it) or you layered into a toolbox by mistake. Homebrew’s installer will also try to tell you what is missing; believe command -v first.
Variant: Toolbox / Distrobox instead of layering gcc
If you refuse to layer anything, you can compile inside a Fedora toolbox and still use a user-space brew prefix. That is a different workflow and you will fight paths. I layer gcc and make once and forget them for a year of Silverblue rebases. Two packages is an acceptable ostree footprint.
Step 2: Run the official Homebrew installer
After your system reboots, open your terminal and run the official Homebrew installation script:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
The script will walk you through the initialization process. Because it detects the read-only root system, it will automatically confine the installation to your user space.
What you should see: a bunch of “==>” lines, a request to press RETURN, then either:
- Prefix
/home/linuxbrew/.linuxbrew(official default when the installer can create thelinuxbrewuser/prefix), or - Prefix
/var/home/<you>/.linuxbrewif the default prefix cannot be created.
Both work. The PATH lines in the next step must match your prefix. Do not copy /home/linuxbrew/... if the installer told you it used ~/.linuxbrew.
On Silverblue, creating /home/linuxbrew may ask for sudo. That is sudo for a directory and user, not sudo for brew itself. After install, ls /home/linuxbrew/.linuxbrew/bin/brew (or ls ~/.linuxbrew/bin/brew) should show the binary.
If curl fails TLS, fix the clock and CA trust on the host before you start piping installers. I still prefer this official script over a random Fedora COPR of brew.
Step 3: Add Homebrew to your PATH (Silverblue specific)
Silverblue uses a unique directory structure where /home is actually a symbolic link pointing to /var/home. Because of this, we need to explicitly inject the environment variables using your absolute home directory path.
Run these three commands to append the environment settings to your .bashrc and instantly activate it for the current terminal session. This is the /home/linuxbrew/.linuxbrew variant the installer typically prints:
echo >> "$HOME/.bashrc"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)"' >> "$HOME/.bashrc"
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)"
If your prefix is ~/.linuxbrew instead:
echo 'eval "$($HOME/.linuxbrew/bin/brew shellenv bash)"' >> "$HOME/.bashrc"
eval "$($HOME/.linuxbrew/bin/brew shellenv bash)"
Why brew shellenv? It exports PATH, MANPATH, INFOPATH, and HOMEBREW_PREFIX. Hand-adding only PATH is how you get brew working and then mysterious compiler failures because HOMEBREW_PREFIX is unset.
Open a new terminal after editing .bashrc. GNOME Terminal on Silverblue should spawn a login/interactive bash that sources it. If you use fish or zsh, the installer printed the equivalent shellenv fish / shellenv zsh lines — use those, not the bash snippet.
Flatpak IDEs (VS Code, etc.) often do not see .bashrc. For those, add the same eval "$(… brew shellenv …)" to ~/.profile or the IDE’s terminal env settings. Otherwise you will think brew “isn’t installed” from the IDE’s integrated terminal.
Step 4: Verify the installation
To make sure your shell is routing the commands to the fresh Homebrew environment properly, run the built-in system check:
brew doctor
type -a brew
brew --prefix
If it returns a success message or standard configuration warnings, you are completely set up.
Expected brew --prefix: /home/linuxbrew/.linuxbrew or /var/home/<you>/.linuxbrew. Expected type -a brew: the first hit should be that prefix’s bin/brew, not a missing command.
brew doctor on Linux always has opinions (config prefixes, missing optional packages). Warnings about putting brew directories before /usr/bin are normal. Errors about unwritable prefixes usually mean you ran something with sudo and now own files as root — fix ownership, do not keep using sudo:
ls -ld "$(brew --prefix)"
Install a tiny package to prove the full path:
brew install hello
hello
You should see the GNU hello greeting from the brew prefix. command -v hello should point under linuxbrew, not /usr/bin.
Quick reference for using brew on Silverblue
- No sudo: Never run
sudo brew install. Homebrew works entirely inside your user space (/var/home/chrisor/home/linuxbrew/.linuxbrew). - OS upgrades: Your Homebrew packages live completely separate from the system image, meaning they will safely survive major Fedora variant upgrades (e.g., upgrading from Silverblue 43 to 44). Re-run
brew doctorafter a rebase if compilers complain; you still have hostgcclayered. - Maintenance: Keep your tools fresh by running
brew update && brew upgradewhenever you like, completely independent of yourrpm-ostreesystem updates. - Analytics:
brew analytics offif you do not want Homebrew’s anonymous metrics. - Uninstall a formula:
brew uninstall <name>. Uninstall Homebrew itself: use the official uninstall script from Homebrew’s repo; then remove theevallines from.bashrc.
Troubleshooting
Installer wants git, rpm-ostree says it conflicts
You tried to layer git. Stop. Use the Git that is already on Silverblue.
brew: command not found after a successful install
The current shell never ran shellenv. source ~/.bashrc or open a new terminal. If it still fails, the eval line points at a prefix that does not exist — compare with ls /home/linuxbrew/.linuxbrew/bin/brew.
Permission denied under .linuxbrew
A previous sudo brew or a root-owned extract. sudo chown -R "$USER:$USER" on your ~/.linuxbrew only. Do not chown /usr.
Formula needs a library that is “in Fedora but not visible”
Brew bottles on Linux expect glibc and a few system libs from the host. That is fine on Silverblue. If a formula wants a -devel package, you can layer that one devel or pick a bottle-friendly formula. Do not start layering a mirror of Homebrew’s dependency tree — you are back to the reboot tax.
Toolbox confusion
which brew inside a toolbox is a different OS. Install brew on the host or in the toolbox, not both unless you enjoy PATH mysteries. I install on the host so every terminal and IDE on the desktop see the same prefix.
Wrap-up
Silverblue plus Homebrew is the combination I want on a laptop: ostree stays small (gcc + make), CLIs install in seconds, and Fedora rebases do not wipe your toolkit. Layer hypervisors and drivers; brew the rest of the CLI.
If you are choosing between a mutable Fedora 44 XFCE box and Silverblue for the same hardware, the day-to-day difference is exactly this reboot tax — I walk through XFCE as a lightweight mutable driver in Is Fedora 44 XFCE a strong lightweight daily driver?.
Best regards,
The Linux IT Guy