brew install iftop

  1. 使用 vi 或者 textmate 编辑 .zshrc 文件,添加iftop可执行文件的路径export PATH=’ /usr/local/Cellar/iftop/1.0pre4/sbin/’(注意单引号,我这里是用 HTML 的转义单引号字符搞的)

  2. 使用sudo iftop -B -o 2s可查看网络流量