Installed Metasploit on my macOS Catalina from the rapid7 website - pkg installation. When trying to run the command msfconsole the terminal displays the following error:

zsh: command not found: msfconsole
  • Where did you install it, which directories are in your $PATH?
    – nohillside
    Sep 5, 2020 at 17:01
  • @nohillside in my .profile I have these lines: PATH=$PATH:/opt/metasploit-framework/binexport and also PATH=$PATH:/opt/metasploit-framework/bin
    – David
    Sep 5, 2020 at 17:05
  • What is the result of echo $PATH?
    – nohillside
    Sep 5, 2020 at 17:09
  • 1
    @nohillside /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
    – David
    Sep 5, 2020 at 17:10
  • According to null-byte.wonderhowto.com/how-to/…, it is located in /opt/metasploit-framework/bin/. Could you check it and report back?
    – jaume
    Sep 5, 2020 at 18:07

1 Answer 1


zsh uses .zprofile in your home directory

Try copying the contents of .profile to .zprofile and then launch a new terminal window

  • I didnt have .zprofile in my home directory, I created a new text document and named it .zprofile copied the contents of .profile and it worked! Thank you.
    – David
    Sep 6, 2020 at 15:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .