diff --git a/Library/Homebrew/cmd/shellenv.sh b/Library/Homebrew/cmd/shellenv.sh index e71c90007b..60e2d601ea 100644 --- a/Library/Homebrew/cmd/shellenv.sh +++ b/Library/Homebrew/cmd/shellenv.sh @@ -4,8 +4,8 @@ #: #: The variables `HOMEBREW_PREFIX`, `HOMEBREW_CELLAR` and `HOMEBREW_REPOSITORY` are also exported to avoid querying them multiple times. #: To help guarantee idempotence, this command produces no output when Homebrew's `bin` and `sbin` directories are first and second -#: respectively in your `PATH`. Consider adding evaluation of this command's output to your dotfiles (e.g. `~/.profile`, -#: `~/.bash_profile`, or `~/.zprofile`) with: `eval "$(brew shellenv)"` +#: respectively in your `PATH`. Consider adding evaluation of this command's output to your dotfiles (e.g. `~/.bash_profile` or +#: `~/.zprofile` on macOS and `~/.bashrc` or `~/.zshrc` on Linux) with: `eval "$(brew shellenv)"` #: #: The shell can be specified explicitly with a supported shell name parameter. Unknown shells will output POSIX exports. diff --git a/docs/Homebrew-on-Linux.md b/docs/Homebrew-on-Linux.md index 56c696292f..dab2c2894a 100644 --- a/docs/Homebrew-on-Linux.md +++ b/docs/Homebrew-on-Linux.md @@ -29,13 +29,12 @@ Technically, you can install Homebrew wherever you want. However, you shouldn't The prefix `/home/linuxbrew/.linuxbrew` was chosen so that users without admin access can ask an admin to create a `linuxbrew` role account and still benefit from precompiled binaries. If you do not yourself have admin privileges, consider asking your admin staff to create a `linuxbrew` role account for you with home directory set to `/home/linuxbrew`. -Follow the *Next steps* instructions to add Homebrew to your `PATH` and to your bash shell profile script, either `~/.profile` on Debian/Ubuntu or `~/.bash_profile` on CentOS/Fedora/Red Hat. +Follow the *Next steps* instructions to add Homebrew to your `PATH` and to your bash shell rcfile, either `~/.bashrc` for `bash` or `~/.zshrc` for `zsh`. ```sh test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)" test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" -test -r ~/.bash_profile && echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.bash_profile -echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.profile +echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.bashrc ``` You're done! Try installing a package: