1

I want to install IFTOP using Brew. However whenever I do it, I need to link it. The instructions given online doesn't work. It seems I need to type a PATH:(something here) every time before using IFTOP.

I'm using a 15-inch Retina Macbook Pro Late 2013. Can someone help me? I always keep my laptop updated to the latest. I don't use beta updates, if that helps.

Let me know how you can help me.

First instructions: http://macappstore.org/iftop/ Second instructions: Problem trying to install iftop via Homebrew

For the second instruction, export PATH=${PATH}:/usr/local/sbin command has to be ran every time. Even saving to a document and linking it (as told in that link) does not make a difference.

0

1 Answer 1

2

/usr/local/sbin is not in your user's PATH variable. The most simple method is adding the path /usr/local/sbin to the file /private/etc/paths:

sudo nano /private/etc/paths

Modify:

/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

to

/usr/local/bin
/usr/bin
/bin
/usr/local/sbin
/usr/sbin
/sbin

and save the file to disk with ctrlO and ctrlX. Then exit the shell or restart Terminal. This will change the PATH for all users.

If you want to restrict it to your user create and/or edit the file ~/.bash_profile with nano and add the line:

export PATH="/usr/local/sbin:$PATH"

Save the file to disk with ctrlO and ctrlX. Then exit the shell or restart Terminal. This will change the PATH for your user only.


To install iftop with brew from scratch in High Sierra with prerequisites (Xcode | Xcode Command Line Tools) already installed , open Terminal.app and enter:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew analytics off #optional
brew doctor #optional
brew install iftop

and add the /usr/local/sbin to the PATH as described earlier.

4
  • If you could add that as an answer to apple.stackexchange.com/questions/46531/… I could close this one here as a duplicate.
    – nohillside
    Commented Oct 23, 2017 at 7:55
  • @patrix The old question and answers are somehow outdated. No make etc necessary now.
    – klanomath
    Commented Oct 23, 2017 at 8:09
  • Both Q are about installing iftop through homebrew
    – nohillside
    Commented Oct 23, 2017 at 8:10
  • FANTASTIC, it works! I suggest to leave this open as I have never seen such an answer before.
    – DrWongKC
    Commented Oct 23, 2017 at 8:22

You must log in to answer this question.

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