mtr says "mtr: unable to get raw sockets"
This is because mtr needs to open raw sockets, which it can only do as root:
$ mtr 220.127.116.11 mtr: unable to get raw sockets. $ sudo mtr 18.104.22.168 Keys: Help Display mode Restart statistics Order of fields quit Packets Pings Host Loss% Snt Last Avg Best Wrst StDev 1. 22.214.171.124 0.0% 69 24.9 32.0 24.8 88.8 12.5 126.96.36.199 188.8.131.52 2. ??? 3. google-public-dns-a.google.com 0.0% 69 24.9 26.5 24.9 35.9 1.6
This can be avoided by changing the ownership of mtr to root and activating the suid bit:
$ sudo chown root:wheel /usr/local/Cellar/mtr/0.85/sbin/mtr $ sudo chmod u+s /usr/local/Cellar/mtr/0.85/sbin/mtr
You are probably reading this because you overlooked the "Caveats" in the install messages:
mtr requires superuser privileges. You can either run the program via `sudo`, or change its ownership to root and set the setuid bit: sudo chown root:wheel /usr/local/Cellar/mtr/0.85/sbin/mtr sudo chmod u+s /usr/local/Cellar/mtr/0.85/sbin/mtr In any case, you should be certain that you trust the software you are executing with elevated privileges.