Mac tshark 报错:command not found: tshark

tshark在安装wireshark的时候就已经安装上了,目录:/Applications/Wireshark.app/Contents/MacOS/tshark

所以使用软连接把这个目录链接到环境中就行:

sudo ln -s /Applications/Wireshark.app/Contents/MacOS/tshark /usr/local/bin/tshark
1
然后输入密码,就可以了,实验:

tshark -v