0

I use homebrew to manage apps in Linux, Ubuntu being more precise. On homebrew installation, I followed recommendations and put its app install location into PATH for my user session (into file ~/.bashrc). This allows me to execute installed apps by just typing its name instead of specifying a full path.

Later I found I cannot execute homebrew-installed apps the same way with sudo, since it seems to be out of PATH for the root user:

$ sudo nmap
sudo: nmap: command not found

$ which nmap
/home/linuxbrew/.linuxbrew/bin/nmap
$ sudo which nmap
# empty output

I'd like to know how to fix the issue to be able to execute any app with sudo

Antonio
  • 101

0 Answers0