[Mac][Homebrew] mtr install record

  • OS Version: macOS Mojave 10.14.6
  • Homebrew Version: 2.1.11
  • MTR version: 0.93_1

If you want to use mtr command in macOS, you will need to install it by homebrew. (Actually there are other way, but homebrew is the most easy way.)

brew install mtr

But you will find out you can't use mtr command after you installed it. The reason is mtr install will change it's directory name by version number, so you need to input this directory's path in your bash's PATH manually.

ll /usr/local/Cellar/mtr/<VERSION NUMBER>/sbin/

vim ~/.bash_profile
export PATH=${PATH}:/usr/local/sbin:/opt/local/bin:/usr/local/Cellar/mtr/0.93_1/sbin/

source ~/.bash_profile

After you set PATH variable, you can be use mtr command.

Add a Comment